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" /> +