Bug 1209967 - review: Set menu buttons visible in xml & remove dynamic visibility. r=me
☠☠ backed out by 65b735be598f ☠ ☠
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 25 Nov 2015 15:58:47 -0800
changeset 309363 cdd9b2d4b72aa2a1ad39fe0f0f279c7687fe2542
parent 309362 ced2c85d9f09a4ee7972442547273b7e32a5d5ae
child 309364 e78763a5c2c3f790c164f5d0eec69d680e97d8ad
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
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/resources/layout-large-v11/browser_toolbar.xml
mobile/android/base/resources/layout/browser_toolbar.xml
mobile/android/base/resources/layout/tabs_panel_default.xml
mobile/android/base/tabs/TabsPanel.java
mobile/android/base/toolbar/BrowserToolbar.java
--- 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"
--- a/mobile/android/base/tabs/TabsPanel.java
+++ b/mobile/android/base/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/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/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();
             }
         });