Use custom height for all apps for CD

Bug: 416220478
Flag: com.android.window.flags.enable_taskbar_connected_displays
Test: m
Change-Id: I772c43cec98e5a2679324603bee128482c614e26
This commit is contained in:
Ajinkya Chalke
2025-05-09 01:14:15 +00:00
parent 2a7a8b5662
commit 0c32760b3c
2 changed files with 15 additions and 0 deletions
@@ -17,7 +17,9 @@ package com.android.launcher3.taskbar.allapps;
import static com.android.launcher3.model.data.AppInfo.EMPTY_ARRAY;
import android.view.Gravity;
import android.view.View;
import android.window.DesktopExperienceFlags;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -31,6 +33,7 @@ import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.taskbar.TaskbarControllers;
import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext;
import com.android.launcher3.util.PackageUserKey;
import com.android.launcher3.views.BaseDragLayer.LayoutParams;
import java.util.Collections;
import java.util.List;
@@ -165,6 +168,16 @@ public final class TaskbarAllAppsController {
mSlideInView = (TaskbarAllAppsSlideInView) mOverlayContext.getLayoutInflater().inflate(
R.layout.taskbar_all_apps_sheet, mOverlayContext.getDragLayer(), false);
if (!mOverlayContext.isPrimaryDisplay()
&& DesktopExperienceFlags.ENABLE_TASKBAR_CONNECTED_DISPLAYS.isTrue()) {
LayoutParams lp = (LayoutParams) mSlideInView.getLayoutParams();
lp.height = mOverlayContext.getResources().getDimensionPixelSize(
R.dimen.all_apps_secondary_display_height);
lp.gravity = Gravity.BOTTOM;
mSlideInView.setLayoutParams(lp);
}
// Ensures All Apps gets touch events in case it is not the top floating view. Floating
// views above it may not be able to intercept the touch, so All Apps should try to.
mOverlayContext.getDragLayer().addTouchController(mSlideInView);
+2
View File
@@ -156,6 +156,8 @@
<dimen name="all_apps_divider_margin_vertical">8dp</dimen>
<dimen name="all_apps_secondary_display_height">900dp</dimen>
<!-- Floating action button inside work tab to toggle work profile -->
<dimen name="work_fab_height">56dp</dimen>
<dimen name="work_fab_radius">16dp</dimen>