Fix: switching states during animations was broken
- cancelling state animations on home screens before starting new ones
- temporary workaround for the fact that onAnimationEnd is not called immediately when an animation is cancelled
- forcing all apps zoom-in animation to complete if it's cancelled
Change-Id: I3eb011f689050692e8d95f2736e01ab5420f722e
diff --git a/src/com/android/launcher2/AllAppsTabbed.java b/src/com/android/launcher2/AllAppsTabbed.java
index eaeb80f..e0ff1a8 100644
--- a/src/com/android/launcher2/AllAppsTabbed.java
+++ b/src/com/android/launcher2/AllAppsTabbed.java
@@ -19,7 +19,6 @@
import com.android.launcher.R;
import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
@@ -81,9 +80,9 @@
final float alpha = mAllApps.getAlpha();
ValueAnimator alphaAnim = ObjectAnimator.ofFloat(mAllApps, "alpha", alpha, 0.0f).
setDuration(duration);
- alphaAnim.addListener(new AnimatorListenerAdapter() {
+ alphaAnim.addListener(new LauncherAnimatorListenerAdapter() {
@Override
- public void onAnimationEnd(Animator animation) {
+ public void onAnimationEndOrCancel(Animator animation) {
String tag = getCurrentTabTag();
if (tag == TAG_ALL) {
mAllApps.setAppFilter(AllAppsPagedView.ALL_APPS_FLAG);