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 207716 71494b7a518aeb59662dfb29a9594f106df03c54
parent 207715 0b6a7eb2c7d756229cec71106d0c741f30d62638
child 207717 84a0967ba12de8ede5bea38638bf8f00c1a4ecf0
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [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();
         }
     }