Bug 1209967 - review: Set menu buttons visible in xml & remove dynamic visibility. r=me a=sylvestre
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 25 Nov 2015 15:58:47 -0800
changeset 310464 14da949cf6784e28601abc324b4add61b6cdffaf
parent 310463 7990937f9b5cb0af3cb2f5638faffbfa65ed3b2d
child 310465 0b2767ccaff51d4c9a76192a3fe0fd7d15d7e709
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, sylvestre
bugs1209967
milestone45.0a2
Bug 1209967 - review: Set menu buttons visible in xml & remove dynamic visibility. r=me a=sylvestre
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"