Move AllAppsButton placement for desktop environment.

On desktop environment, we want the AllAppsButton to be on the left side
of the taskbar instead of the hotseat, but retain the functionality of
the button.

Bug: 251372204
Test: Manual
Change-Id: Ia2c95a20583cb98785ab6f8c719559d93982c06f
This commit is contained in:
Merissa Tan
2022-10-18 14:00:09 -07:00
parent 381ba3319d
commit fcb9cb7664
2 changed files with 16 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ package com.android.launcher3.taskbar;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Rect;
@@ -126,6 +127,9 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
mAllAppsButton = LayoutInflater.from(context)
.inflate(R.layout.taskbar_all_apps_button, this, false);
mAllAppsButton.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
if (mActivityContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_PC)) {
mAllAppsButton.setVisibility(GONE);
}
}
// TODO: Disable touch events on QSB otherwise it can crash.