diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2016-06-21 16:37:13 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2016-06-21 16:37:13 -0700 |
commit | eac1dac23944ea5127dc12a161f016f18a5599cb (patch) | |
tree | f68e32184deff11fef4c47ba9bc359ea3a314bbd /src/com/android/launcher3/LauncherStateTransitionAnimation.java | |
parent | 314d53fbafa591aa310639b9ce085c5304a24535 (diff) | |
download | android_packages_apps_Trebuchet-eac1dac23944ea5127dc12a161f016f18a5599cb.tar.gz android_packages_apps_Trebuchet-eac1dac23944ea5127dc12a161f016f18a5599cb.tar.bz2 android_packages_apps_Trebuchet-eac1dac23944ea5127dc12a161f016f18a5599cb.zip |
All apps pull up work
b/28917826
b/29469966
b/29542376
- Move state transition to when the finger is lifted and not when
the view settles.
- Refactor the vertical pull detector to use bit operation to define
which direction scroll to allow.
- Fixed many issues regarding screen rotation
- Fixes issue where slowly sliding the all apps goes into overview mode
- Fixes issue where quick slide up leads to animation starting from middle
Change-Id: I2384a0fcc5550e17359a044ef506bcc66507da5f
Diffstat (limited to 'src/com/android/launcher3/LauncherStateTransitionAnimation.java')
-rw-r--r-- | src/com/android/launcher3/LauncherStateTransitionAnimation.java | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java index fd4aff98e..e94153d68 100644 --- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java +++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java @@ -420,7 +420,7 @@ public class LauncherStateTransitionAnimation { pCb.onTransitionComplete(); } }); - mAllAppsController.animateToAllApps(animation, revealDuration); + mAllAppsController.animateToAllApps(animation, revealDuration, false); dispatchOnLauncherTransitionPrepare(fromView, animated, false); dispatchOnLauncherTransitionPrepare(toView, animated, false); @@ -861,37 +861,31 @@ public class LauncherStateTransitionAnimation { return animation; } else if (animType == PULLUP) { animation.addListener(new AnimatorListenerAdapter() { + boolean canceled = false; @Override - public void onAnimationEnd(Animator animation) { - dispatchOnLauncherTransitionEnd(fromView, animated, false); - dispatchOnLauncherTransitionEnd(toView, animated, false); - cleanupAnimation(); - pCb.onTransitionComplete(); + public void onAnimationCancel(Animator animation) { + canceled = true; } - }); - mAllAppsController.animateToWorkspace(animation, revealDuration); - - // Dispatch the prepare transition signal - dispatchOnLauncherTransitionPrepare(fromView, animated, false); - dispatchOnLauncherTransitionPrepare(toView, animated, false); - - animation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { - dispatchOnLauncherTransitionEnd(fromView, animated, true); - dispatchOnLauncherTransitionEnd(toView, animated, true); - + if (canceled) return; + dispatchOnLauncherTransitionEnd(fromView, animated, false); + dispatchOnLauncherTransitionEnd(toView, animated, false); // Run any queued runnables if (onCompleteRunnable != null) { onCompleteRunnable.run(); } - - // This can hold unnecessary references to views. cleanupAnimation(); pCb.onTransitionComplete(); } + }); + mAllAppsController.animateToWorkspace(animation, revealDuration, false); + + // Dispatch the prepare transition signal + dispatchOnLauncherTransitionPrepare(fromView, animated, false); + dispatchOnLauncherTransitionPrepare(toView, animated, false); final AnimatorSet stateAnimation = animation; final Runnable startAnimRunnable = new Runnable() { |