From 1f98b68ea0ddd97ab245be6bf148d049a2f35c91 Mon Sep 17 00:00:00 2001 From: ctj Date: Thu, 30 Nov 2023 16:03:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2=E5=BA=94=E7=94=A8=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wave_chtj/example/allapp/AllAppAty.java | 22 +++++++--- app/src/main/res/layout/activity_allapp.xml | 18 ++++++-- .../face_chtj/base_iotutils/AppsUtils.java | 43 ++++++++++++++++--- 3 files changed, 70 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/wave_chtj/example/allapp/AllAppAty.java b/app/src/main/java/com/wave_chtj/example/allapp/AllAppAty.java index 058baac..4b28b78 100644 --- a/app/src/main/java/com/wave_chtj/example/allapp/AllAppAty.java +++ b/app/src/main/java/com/wave_chtj/example/allapp/AllAppAty.java @@ -102,19 +102,31 @@ public void run() { KLog.e(TAG, "errMeg:" + e.getMessage()); tvTotal.setText("总流量:计算异常"); } - newsAdapter.setList(AppsUtils.getAllApp(true)); + newsAdapter.setList(AppsUtils.getAllApp()); } }); } /** - * 查询桌面应用 + * 查询全部应用 * * @param view */ public void getAllAppClick(View view) { - List appEntityList = AppsUtils.getAllApp(true); + List appEntityList = AppsUtils.getAllApp(); + tvCount.setText("总数:" + appEntityList.size()); + newsAdapter.setList(appEntityList); + } + + + /** + * 查询桌面应用 + * + * @param view + */ + public void getDeskAppClick(View view) { + List appEntityList = AppsUtils.getDeskTopAppList(); tvCount.setText("总数:" + appEntityList.size()); newsAdapter.setList(appEntityList); } @@ -154,7 +166,7 @@ public void rebootClick(View view) { * @param view */ public void getNormalApp(View view) { - List appEntityList = AppsUtils.getAllApp(true); + List appEntityList = AppsUtils.getAllApp(); List normalAppList=new ArrayList<>(); for (int i = 0; i < appEntityList.size(); i++) { if (!appEntityList.get(i).isSystemApp){ @@ -171,7 +183,7 @@ public void getNormalApp(View view) { * @param view */ public void getSystemApp(View view) { - List appEntityList = AppsUtils.getAllApp(true); + List appEntityList = AppsUtils.getAllApp(); List systemAppList=new ArrayList<>(); for (int i = 0; i < appEntityList.size(); i++) { if (appEntityList.get(i).isSystemApp){ diff --git a/app/src/main/res/layout/activity_allapp.xml b/app/src/main/res/layout/activity_allapp.xml index 67b109e..e7b715a 100644 --- a/app/src/main/res/layout/activity_allapp.xml +++ b/app/src/main/res/layout/activity_allapp.xml @@ -10,9 +10,9 @@ android:layout_width="match_parent" android:layout_height="50dp" app:centerText="应用列表" + app:leftBack="true" app:leftText="<<" app:rightText="旋转" - app:leftBack="true" app:textSize="24sp" /> @@ -52,6 +52,17 @@ android:text="全部应用" android:textSize="@dimen/small_text_size" /> +