首先把AllAppsButton去掉,
在HotSet.java中的把mContent.addViewToCellLayout(allAppsButton, -1, allAppsButton.getId(), lp, true);注释
改变mAllAppsButtonRank的值为-1,这个值是表示那个位置放置AllAppsButton
还需要在/res/xml/dw_tablet_hotseat.xml中把AllAppsButton位置设置一个Iteam
接下来就是要把所有APP放到桌面,Launcher加载桌面数据是通过查询数据库Favorites和workspaceScreen来获得的,所以我们需要在
第一次启动Launcher时把所有App的信息写到数据库中去
public void addItemToFavorites(Context context){
+ final List<UserHandleCompat> profiles = mUserManager.getUserProfiles();
+
+ for (UserHandleCompat user : profiles) {
+ final List<LauncherActivityInfoCompat> apps = mLauncherApps.getActivityList(null, user);
+ // Fail if we don't have any apps
+ // TODO: Fix this. Only fail for the current user.
+ if (apps == null || ap
在HotSet.java中的把mContent.addViewToCellLayout(allAppsButton, -1, allAppsButton.getId(), lp, true);注释
改变mAllAppsButtonRank的值为-1,这个值是表示那个位置放置AllAppsButton
还需要在/res/xml/dw_tablet_hotseat.xml中把AllAppsButton位置设置一个Iteam
接下来就是要把所有APP放到桌面,Launcher加载桌面数据是通过查询数据库Favorites和workspaceScreen来获得的,所以我们需要在
第一次启动Launcher时把所有App的信息写到数据库中去
public void addItemToFavorites(Context context){
+ final List<UserHandleCompat> profiles = mUserManager.getUserProfiles();
+
+ for (UserHandleCompat user : profiles) {
+ final List<LauncherActivityInfoCompat> apps = mLauncherApps.getActivityList(null, user);
+ // Fail if we don't have any apps
+ // TODO: Fix this. Only fail for the current user.
+ if (apps == null || ap