Use same margins for widgets bottom sheet as all apps.

* Per UX discussion with jane and david, the full width looks too large
for the app info -> long press -> widgets bottom sheet.
* Earlier during POR, we decided to match them all, but after trying it out, we think smaller is better for the app specific bottom sheet.

* http://screencast/cast/NTg1Njk1MDUxOTU5NTAwOHxiMDU0YWJhMi04MQ
* http://screencast/cast/NjU0NjQyODgwMDI3MDMzNnw4NDNhMGVjMy0yMg


Bug: 328812171
Test: screencast
Flag: N/A
Change-Id: I9b0a996f80bac2639bcadf85480468ac886c7093
This commit is contained in:
Shamali P authored and Shamali Patwa committed 2024-04-18 16:58:39 +00:00
1 parent 8fc5e593c3
commit 50bf021b02
2 files changed
+23 -15

No files matched your search

@@ -16,8 +16,6 @@
package com.android.launcher3.widget;
import static com.android.app.animation.Interpolators.EMPHASIZED;
import static com.android.launcher3.Flags.enableCategorizedWidgetSuggestions;
import static com.android.launcher3.Flags.enableUnfoldedTwoPanePicker;
import static com.android.launcher3.Flags.enableWidgetTapToAdd;
import static com.android.launcher3.LauncherPrefs.WIDGETS_EDUCATION_TIP_SEEN;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WIDGET_ADD_BUTTON_TAP;
@@ -272,19 +270,8 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<BaseActivity>
MeasureSpec.getSize(heightMeasureSpec));
}
private int getTabletHorizontalMargin(DeviceProfile deviceProfile) {
// All bottom-sheets showing widgets will be full-width across all devices.
if (enableCategorizedWidgetSuggestions()) {
return 0;
}
if (deviceProfile.isLandscape && !deviceProfile.isTwoPanels) {
return getResources().getDimensionPixelSize(
R.dimen.widget_picker_landscape_tablet_left_right_margin);
}
if (deviceProfile.isTwoPanels && enableUnfoldedTwoPanePicker()) {
return getResources().getDimensionPixelSize(
R.dimen.widget_picker_two_panels_left_right_margin);
}
/** Returns the horizontal margins to be applied to the widget sheet. **/
protected int getTabletHorizontalMargin(DeviceProfile deviceProfile) {
return deviceProfile.allAppsLeftRightMargin;
}