Bug 1001243: Disable tabs button when in editing mode. r=bnicholson
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 12 May 2014 15:19:16 -0700
changeset 182813 33790bff0cdf90c84bb845067eccb1127e737b25
parent 182812 c2c0ff81cb7279f0a6e876498da991d2bd0a3052
child 182814 4d044c48fd973dac8b226338b00c37f4845ec8f4
push id26770
push usercbook@mozilla.com
push dateTue, 13 May 2014 10:31:28 +0000
treeherdermozilla-central@2cd3bedf26b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson
bugs1001243
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 1001243: Disable tabs button when in editing mode. r=bnicholson
mobile/android/base/toolbar/BrowserToolbar.java
--- a/mobile/android/base/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/toolbar/BrowserToolbar.java
@@ -999,21 +999,27 @@ public class BrowserToolbar extends Them
     private void showEditingWithoutAnimation(final int entryTranslation,
             final int curveTranslation) {
         showUrlEditLayout();
 
         if (urlBarTranslatingEdge != null) {
             ViewHelper.setTranslationX(urlBarTranslatingEdge, entryTranslation);
         }
 
+        // Prevent taps through the editing mode cancel button (bug 1001243).
+        tabsButton.setEnabled(false);
+
         ViewHelper.setTranslationX(tabsButton, curveTranslation);
         ViewHelper.setTranslationX(tabsCounter, curveTranslation);
         ViewHelper.setTranslationX(actionItemBar, curveTranslation);
 
         if (hasSoftMenuButton) {
+            // Prevent tabs through the editing mode cancel button (bug 1001243).
+            menuButton.setEnabled(false);
+
             ViewHelper.setTranslationX(menuButton, curveTranslation);
             ViewHelper.setTranslationX(menuIcon, curveTranslation);
         }
     }
 
     private void showEditingWithPhoneAnimation(final PropertyAnimator animator,
             final int entryTranslation, final int curveTranslation) {
         if (isAnimatingEntry)
@@ -1125,21 +1131,25 @@ public class BrowserToolbar extends Them
         if (urlBarTranslatingEdge != null) {
             urlBarTranslatingEdge.setVisibility(View.INVISIBLE);
             ViewHelper.setTranslationX(urlBarTranslatingEdge, 0);
             if (shouldShrinkURLBar) {
                 urlBarEntry.setLayoutParams(urlBarEntryDefaultLayoutParams);
             }
         }
 
+        tabsButton.setEnabled(true);
+
         ViewHelper.setTranslationX(tabsButton, 0);
         ViewHelper.setTranslationX(tabsCounter, 0);
         ViewHelper.setTranslationX(actionItemBar, 0);
 
         if (hasSoftMenuButton) {
+            menuButton.setEnabled(true);
+
             ViewHelper.setTranslationX(menuButton, 0);
             ViewHelper.setTranslationX(menuIcon, 0);
         }
     }
 
     private void stopEditingWithPhoneAnimation() {
         final PropertyAnimator contentAnimator = new PropertyAnimator(250);
         contentAnimator.setUseHardwareLayer(false);