Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +2 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mNavBarScrimHeight = insets.bottom; InsettableFrameLayout.dispatchInsets(this, insets); mLauncher.getAllAppsController() .setScrollRangeDelta(mSearchUiManager.getScrollRangeDelta(insets)); } @Override Loading src/com/android/launcher3/allapps/AllAppsTransitionController.java +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil /** * Updates the total scroll range but does not update the UI. */ public void setScrollRangeDelta(float delta) { void setScrollRangeDelta(float delta) { mScrollRangeDelta = delta; mShiftRange = mLauncher.getDeviceProfile().heightPx - mScrollRangeDelta; Loading src/com/android/launcher3/allapps/SearchUiManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.launcher3.allapps; import android.graphics.Rect; import android.view.KeyEvent; import android.view.animation.Interpolator; Loading @@ -41,6 +42,11 @@ public interface SearchUiManager { */ void preDispatchKeyEvent(KeyEvent keyEvent); /** * Returns the vertical shift for the all-apps view, so that it aligns with the hotseat. */ float getScrollRangeDelta(Rect insets); /** * Called as part of state transition to update the content UI */ Loading src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java +8 −5 Original line number Diff line number Diff line Loading @@ -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; } } Loading Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +2 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mNavBarScrimHeight = insets.bottom; InsettableFrameLayout.dispatchInsets(this, insets); mLauncher.getAllAppsController() .setScrollRangeDelta(mSearchUiManager.getScrollRangeDelta(insets)); } @Override Loading
src/com/android/launcher3/allapps/AllAppsTransitionController.java +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil /** * Updates the total scroll range but does not update the UI. */ public void setScrollRangeDelta(float delta) { void setScrollRangeDelta(float delta) { mScrollRangeDelta = delta; mShiftRange = mLauncher.getDeviceProfile().heightPx - mScrollRangeDelta; Loading
src/com/android/launcher3/allapps/SearchUiManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.launcher3.allapps; import android.graphics.Rect; import android.view.KeyEvent; import android.view.animation.Interpolator; Loading @@ -41,6 +42,11 @@ public interface SearchUiManager { */ void preDispatchKeyEvent(KeyEvent keyEvent); /** * Returns the vertical shift for the all-apps view, so that it aligns with the hotseat. */ float getScrollRangeDelta(Rect insets); /** * Called as part of state transition to update the content UI */ Loading
src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java +8 −5 Original line number Diff line number Diff line Loading @@ -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; } } Loading