Bug 865228 - Hide stop/reader buttons immediately when entering awesomescreen (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 01 May 2013 17:32:02 +0100
changeset 141431 3c956043cac33e60b012f5e89c56d3765332ffa0
parent 141430 6d323a2eef78c08173a4bade366efccfe721c239
child 141432 8c5e1ae70259b7c0097bdad3136798b4eef5ad7a
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs865228
milestone23.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 865228 - Hide stop/reader buttons immediately when entering awesomescreen (r=mfinkle)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -583,16 +583,21 @@ public class BrowserToolbar implements T
             proxy.setTranslationX(curveTranslation);
             proxy = AnimatorProxy.create(mActionItemBar);
             proxy.setTranslationX(curveTranslation);
 
             if (mHasSoftMenuButton) {
                 proxy = AnimatorProxy.create(mMenu);
                 proxy.setTranslationX(curveTranslation);
             }
+
+            proxy = AnimatorProxy.create(mReader);
+            proxy.setAlpha(0);
+            proxy = AnimatorProxy.create(mStop);
+            proxy.setAlpha(0);
         }
 
         final PropertyAnimator contentAnimator = new PropertyAnimator(250);
         contentAnimator.setUseHardwareLayer(false);
 
         // Shrink the awesome entry back to its original size
         contentAnimator.attach(mAwesomeBarRightEdge,
                                PropertyAnimator.Property.TRANSLATION_X,
@@ -667,23 +672,21 @@ public class BrowserToolbar implements T
         contentAnimator.setUseHardwareLayer(false);
 
         final int entryTranslation = getAwesomeBarEntryTranslation();
         final int curveTranslation = getAwesomeBarCurveTranslation();
 
         // Keep the entry highlighted during the animation
         mLayout.setSelected(true);
 
-        // Fade out all controls inside the toolbar
-        contentAnimator.attach(mReader,
-                               PropertyAnimator.Property.ALPHA,
-                               0);
-        contentAnimator.attach(mStop,
-                               PropertyAnimator.Property.ALPHA,
-                               0);
+        // Hide stop/reader buttons immediately
+        AnimatorProxy proxy = AnimatorProxy.create(mReader);
+        proxy.setAlpha(0);
+        proxy = AnimatorProxy.create(mStop);
+        proxy.setAlpha(0);
 
         // Slide the right side elements of the toolbar
         contentAnimator.attach(mAwesomeBarRightEdge,
                                PropertyAnimator.Property.TRANSLATION_X,
                                entryTranslation);
         contentAnimator.attach(mTabs,
                                PropertyAnimator.Property.TRANSLATION_X,
                                curveTranslation);