summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-07-31 12:39:57 -0700
committerWinson Chung <winsonc@google.com>2015-07-31 12:59:11 -0700
commite8f1d047b1b788bc9884be2417e7aa0cec7e8ae8 (patch)
tree3b28fa97aaeb8594c776636bf04aa4636f876042
parentdeaf4d169b6e08ae2c41ae67ea97147164089b16 (diff)
downloadandroid_packages_apps_Trebuchet-e8f1d047b1b788bc9884be2417e7aa0cec7e8ae8.tar.gz
android_packages_apps_Trebuchet-e8f1d047b1b788bc9884be2417e7aa0cec7e8ae8.tar.bz2
android_packages_apps_Trebuchet-e8f1d047b1b788bc9884be2417e7aa0cec7e8ae8.zip
Fixing issue with flash during overview transition.
- This is due to the TransitionDrawable which does not actually start an animation until it is first drawn. This workaround will just immediately reset the transition if it is not currently visible instead of animating (which is actually deferred until the next animation into overview mode). Bug: 22414257 Change-Id: Id481303d0c99a20c1d16396c024ab50303f45576
-rw-r--r--src/com/android/launcher3/CellLayout.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 809688712..b875d22e6 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -211,6 +211,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
mBackground = (TransitionDrawable) res.getDrawable(R.drawable.bg_screenpanel);
mBackground.setCallback(this);
+ mBackground.setAlpha((int) (mBackgroundAlpha * 255));
mReorderPreviewAnimationMagnitude = (REORDER_PREVIEW_MAGNITUDE *
grid.iconSizePx);
@@ -414,7 +415,11 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
if (mIsDragOverlapping) {
mBackground.startTransition(BACKGROUND_ACTIVATE_DURATION);
} else {
- mBackground.reverseTransition(BACKGROUND_ACTIVATE_DURATION);
+ if (mBackgroundAlpha > 0f) {
+ mBackground.reverseTransition(BACKGROUND_ACTIVATE_DURATION);
+ } else {
+ mBackground.resetTransition();
+ }
}
invalidate();
}