diff options
Diffstat (limited to 'src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java')
-rw-r--r-- | src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java index b1e23d4e2..1ff484b49 100644 --- a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java +++ b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java @@ -208,13 +208,16 @@ public class AppsSearchContainerLayout extends ExtendedEditText MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams(); mlp.topMargin = Math.round(Math.max(-mFixedTranslationY, insets.top - mMarginTopAdjusting)); requestLayout(); + } - DeviceProfile dp = mLauncher.getDeviceProfile(); - if (dp.isVerticalBarLayout()) { - mLauncher.getAllAppsController().setScrollRangeDelta(0); + @Override + public float getScrollRangeDelta(Rect insets) { + if (mLauncher.getDeviceProfile().isVerticalBarLayout()) { + return 0; } else { - mLauncher.getAllAppsController().setScrollRangeDelta( - insets.bottom + mlp.topMargin + mFixedTranslationY); + int topMargin = Math.round(Math.max( + -mFixedTranslationY, insets.top - mMarginTopAdjusting)); + return insets.bottom + topMargin + mFixedTranslationY; } } |