Bug 1209967 - review: Set menu buttons visible in xml & remove dynamic visibility. r=me
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 25 Nov 2015 15:58:47 -0800
changeset 276451 64797414bcf3fdf63be2cf15d7e3a12f09328f45
parent 276450 0497e398a7e268b42c65ecf41846a599500d481c
child 276452 60d6164f4bcb71c962e6603b78dc440ccb3e90c8
push id69162
push usercbook@mozilla.com
push dateTue, 15 Dec 2015 13:52:23 +0000
treeherdermozilla-inbound@98d65afd9826 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1209967
milestone45.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 1209967 - review: Set menu buttons visible in xml & remove dynamic visibility. r=me
mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
mobile/android/base/resources/layout/browser_toolbar.xml
mobile/android/base/resources/layout/tabs_panel_default.xml
--- a/mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
+++ b/mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
@@ -362,17 +362,16 @@ public class TabsPanel extends LinearLay
 
             default:
                 throw new IllegalArgumentException("Unknown panel type " + panelToShow);
         }
         mPanel.show();
 
         mAddTab.setVisibility(View.VISIBLE);
 
-        mMenuButton.setVisibility(View.VISIBLE);
         mMenuButton.setEnabled(true);
         mPopupMenu.setAnchor(mMenuButton);
     }
 
     public int getVerticalPanelHeight() {
         final int actionBarHeight = mContext.getResources().getDimensionPixelSize(R.dimen.browser_toolbar_height);
         final int height = actionBarHeight + getTabContainerHeight(mTabsContainer);
         return height;
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
@@ -314,17 +314,16 @@ public abstract class BrowserToolbar ext
                 // panel open does not go to the editing field.
                 urlEditLayout.clearFocus();
 
                 toggleTabs();
             }
         });
         tabsButton.setImageLevel(0);
 
-        menuButton.setVisibility(View.VISIBLE);
         menuButton.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View view) {
                 // Drop the soft keyboard.
                 urlEditLayout.clearFocus();
                 activity.openOptionsMenu();
             }
         });
--- a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
@@ -119,18 +119,17 @@
           android:visibility="gone"/>
 
     <org.mozilla.gecko.widget.themed.ThemedFrameLayout
             android:id="@+id/menu"
             style="@style/UrlBar.ImageButton"
             android:layout_toLeftOf="@id/menu_margin"
             android:layout_alignWithParentIfMissing="true"
             android:contentDescription="@string/menu"
-            android:background="@drawable/browser_toolbar_action_bar_button"
-            android:visibility="gone">
+            android:background="@drawable/browser_toolbar_action_bar_button">
 
         <org.mozilla.gecko.widget.themed.ThemedImageView
                 android:id="@+id/menu_icon"
                 style="@style/UrlBar.ImageButton.BrowserToolbarColors"
                 android:layout_height="@dimen/browser_toolbar_menu_icon_height"
                 android:layout_width="wrap_content"
                 android:scaleType="centerInside"
                 android:src="@drawable/menu"
--- a/mobile/android/base/resources/layout/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout/browser_toolbar.xml
@@ -36,18 +36,17 @@
                android:src="@drawable/url_bar_translating_edge"
                android:scaleType="fitXY"/>
 
     <org.mozilla.gecko.toolbar.ShapedButtonFrameLayout
             android:id="@+id/menu"
             style="@style/UrlBar.ImageButton"
             android:layout_alignParentRight="true"
             android:contentDescription="@string/menu"
-            android:background="@drawable/shaped_button"
-            android:visibility="gone">
+            android:background="@drawable/shaped_button">
 
         <org.mozilla.gecko.widget.themed.ThemedImageView
                 android:id="@+id/menu_icon"
                 style="@style/UrlBar.ImageButton"
                 android:layout_height="@dimen/browser_toolbar_menu_icon_height"
                 android:layout_width="wrap_content"
                 android:scaleType="centerInside"
                 android:layout_gravity="center"
--- a/mobile/android/base/resources/layout/tabs_panel_default.xml
+++ b/mobile/android/base/resources/layout/tabs_panel_default.xml
@@ -48,18 +48,17 @@
                          android:src="@drawable/tab_new"
                          android:contentDescription="@string/new_tab"
                          android:background="@drawable/action_bar_button_inverse"/>
 
             <FrameLayout android:id="@+id/menu"
                          style="@style/UrlBar.ImageButton"
                          android:layout_width="@dimen/tabs_panel_button_width"
                          android:background="@drawable/action_bar_button_inverse"
-                         android:contentDescription="@string/menu"
-                         android:visibility="gone">
+                         android:contentDescription="@string/menu">
 
                 <ImageButton
                         style="@style/UrlBar.ImageButton"
                         android:layout_width="wrap_content"
                         android:layout_height="@dimen/browser_toolbar_menu_icon_height"
                         android:layout_gravity="center"
                         android:scaleType="centerInside"
                         android:src="@drawable/menu"