summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-07-07 15:57:42 -0700
committerHyunyoung Song <hyunyoungs@google.com>2016-07-07 16:11:16 -0700
commit2359a6801792a0cc88bda30a9874416b2d101175 (patch)
tree542a5f86ec10cde511492844891e73f6b6863407 /src
parente49a97aba08ac5a5a3de2c09cc2ae027a13f7d75 (diff)
downloadandroid_packages_apps_Trebuchet-2359a6801792a0cc88bda30a9874416b2d101175.tar.gz
android_packages_apps_Trebuchet-2359a6801792a0cc88bda30a9874416b2d101175.tar.bz2
android_packages_apps_Trebuchet-2359a6801792a0cc88bda30a9874416b2d101175.zip
Do not remove onLayoutChangeListener on hotseat inside AllAppsTransitionController
Change-Id: I883660906b5bf59035f0382e6a448c6992a58a0c
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsTransitionController.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 0babc1a80..b42b762a7 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -65,6 +65,8 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
private float mShiftCurrent; // [0, mShiftRange]
private float mShiftRange; // changes depending on the orientation
+ private static final float DEFAULT_SHIFT_RANGE = 10;
+
private static final float RECATCH_REJECTION_FRACTION = .0875f;
@@ -81,6 +83,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
mLauncher = launcher;
mDetector = new VerticalPullDetector(launcher);
mDetector.setListener(this);
+ mShiftCurrent = mShiftRange = DEFAULT_SHIFT_RANGE;
mBezelSwipeUpHeight = launcher.getResources().getDimensionPixelSize(
R.dimen.all_apps_bezel_swipe_height);
}
@@ -436,14 +439,12 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
+ float prevShiftRatio = mShiftCurrent / mShiftRange;
if (!mLauncher.getDeviceProfile().isVerticalBarLayout()) {
mShiftRange = top;
} else {
mShiftRange = bottom;
}
- if (!mLauncher.isAllAppsVisible()) {
- setProgress(mShiftRange);
- }
- mHotseat.removeOnLayoutChangeListener(this);
+ setProgress(mShiftRange * prevShiftRatio);
}
}