Bug 1017566 - Clear animation before setting visibility to GONE for Gingerbread compatibility. r=mfinkle
authorKartikaya Gupta <kgupta@mozilla.com>
Sat, 07 Jun 2014 16:47:32 -0400
changeset 206632 71494b7a518aeb59662dfb29a9594f106df03c54
parent 206631 0b6a7eb2c7d756229cec71106d0c741f30d62638
child 206633 84a0967ba12de8ede5bea38638bf8f00c1a4ecf0
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1017566
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1017566 - Clear animation before setting visibility to GONE for Gingerbread compatibility. r=mfinkle
mobile/android/base/widget/ButtonToast.java
--- a/mobile/android/base/widget/ButtonToast.java
+++ b/mobile/android/base/widget/ButtonToast.java
@@ -144,16 +144,17 @@ public class ButtonToast {
             // Using Android's animation frameworks will not correctly turn off clicking.
             // See bug 885717.
             PropertyAnimator animator = new PropertyAnimator(duration);
             animator.attach(mView, PropertyAnimator.Property.ALPHA, 0.0f);
             animator.addPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener () {
                 // If we are showing a toast and go in the background
                 // onAnimationEnd will be called when the app is restored
                 public void onPropertyAnimationEnd() {
+                    mView.clearAnimation();
                     mView.setVisibility(View.GONE);
                 }
                 public void onPropertyAnimationStart() { }
             });
             animator.start();
         }
     }