Adds all_apps_sheet_for_handheld flag.

This flag causes All Apps to render on a background panel in
handheld mode similarly to how it does on tablets.

Demo: https://drive.google.com/file/d/11K8yueTb9Xr8oRJCM3TxcFH8V3rRFJrJ/view?usp=sharing&resourcekey=0-hMNEGzMQ5KC9D7may2Gb-g

Bug: 374186088
Bug: 372618421
Test: Manual
Flag: com.android.launcher3.all_apps_sheet_for_handheld
Change-Id: Ie0b1e784d4330fd71f7f36f39e5dd85e8ee14933
This commit is contained in:
Andy Wickham committed 2024-11-06 16:05:25 +00:00
1 parent 43da2538ff
commit 1f6a7b46be
8 files changed
+44 -70

No files matched your search

+6 -1
View File
@@ -827,7 +827,7 @@ public class DeviceProfile {
hotseatBorderSpace = cellLayoutBorderSpacePx.y;
}
if (isTablet) {
if (shouldShowAllAppsOnSheet()) {
allAppsPadding.top = mInsets.top;
allAppsShiftRange = heightPx;
} else {
@@ -1516,6 +1516,11 @@ public class DeviceProfile {
}
}
/** Whether All Apps should be presented on a bottom sheet. */
public boolean shouldShowAllAppsOnSheet() {
return isTablet || Flags.allAppsSheetForHandheld();
}
private void setupAllAppsStyle(Context context) {
TypedArray allAppsStyle = context.obtainStyledAttributes(
inv.allAppsStyle != INVALID_RESOURCE_HANDLE ? inv.allAppsStyle