Loading src/com/android/launcher3/widget/AddItemWidgetsBottomSheet.java +10 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.widget; import static com.android.launcher3.Utilities.ATLEAST_R; import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.widget.BaseWidgetSheet.MAX_WIDTH_SCALE_FOR_LARGER_SCREEN; import android.animation.PropertyValuesHolder; import android.annotation.SuppressLint; Loading Loading @@ -109,6 +110,15 @@ public class AddItemWidgetsBottomSheet extends AbstractSlideInView<AddItemActivi 2 * (mInsets.left + mInsets.right)); } if (deviceProfile.isTablet || deviceProfile.isTwoPanels) { // In large screen devices, we restrict the width of the widgets picker to show part of // the home screen. Let's ensure the minimum width used is at least the minimum width // that isn't taken by the widgets picker. int minUsedWidth = (int) (deviceProfile.availableWidthPx * (1 - MAX_WIDTH_SCALE_FOR_LARGER_SCREEN)); widthUsed = Math.max(widthUsed, minUsedWidth); } int heightUsed = mInsets.top + deviceProfile.edgeMarginPx; measureChildWithMargins(mContent, widthMeasureSpec, widthUsed, heightMeasureSpec, heightUsed); Loading src/com/android/launcher3/widget/BaseWidgetSheet.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher> * The maximum scale, [0, 1], of the device screen width that the widgets picker can consume * on large screen devices. */ protected static final float MAX_WIDTH_SCALE_FOR_LARGER_SCREEN = 0.8f; protected static final float MAX_WIDTH_SCALE_FOR_LARGER_SCREEN = 0.89f; protected static final String KEY_WIDGETS_EDUCATION_TIP_SEEN = "launcher.widgets_education_tip_seen"; Loading Loading
src/com/android/launcher3/widget/AddItemWidgetsBottomSheet.java +10 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.widget; import static com.android.launcher3.Utilities.ATLEAST_R; import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.widget.BaseWidgetSheet.MAX_WIDTH_SCALE_FOR_LARGER_SCREEN; import android.animation.PropertyValuesHolder; import android.annotation.SuppressLint; Loading Loading @@ -109,6 +110,15 @@ public class AddItemWidgetsBottomSheet extends AbstractSlideInView<AddItemActivi 2 * (mInsets.left + mInsets.right)); } if (deviceProfile.isTablet || deviceProfile.isTwoPanels) { // In large screen devices, we restrict the width of the widgets picker to show part of // the home screen. Let's ensure the minimum width used is at least the minimum width // that isn't taken by the widgets picker. int minUsedWidth = (int) (deviceProfile.availableWidthPx * (1 - MAX_WIDTH_SCALE_FOR_LARGER_SCREEN)); widthUsed = Math.max(widthUsed, minUsedWidth); } int heightUsed = mInsets.top + deviceProfile.edgeMarginPx; measureChildWithMargins(mContent, widthMeasureSpec, widthUsed, heightMeasureSpec, heightUsed); Loading
src/com/android/launcher3/widget/BaseWidgetSheet.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher> * The maximum scale, [0, 1], of the device screen width that the widgets picker can consume * on large screen devices. */ protected static final float MAX_WIDTH_SCALE_FOR_LARGER_SCREEN = 0.8f; protected static final float MAX_WIDTH_SCALE_FOR_LARGER_SCREEN = 0.89f; protected static final String KEY_WIDGETS_EDUCATION_TIP_SEEN = "launcher.widgets_education_tip_seen"; Loading