Bug 1348086 - Part 1 - Use distinct R.id for the tabs tray menu button. r?gbrown
Robocop/Robotium gets terribly confused if multiple views use the same R.id, even if they're never shown together at the same time.
Without this patch, opening of the main menu fails once the tabs tray has been opened (and closed again) at least once.
MozReview-Commit-ID: IOyxG4SCyzF
--- a/mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
+++ b/mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
@@ -164,17 +164,17 @@ public class TabsPanel extends LinearLay
privateTabsPanel.setPrivateMode(true);
if (!Restrictions.isAllowed(mContext, Restrictable.PRIVATE_BROWSING)) {
mTabWidget.setVisibility(View.GONE);
}
mTabWidget.setTabSelectionListener(this);
- mMenuButton = findViewById(R.id.menu);
+ mMenuButton = findViewById(R.id.tabs_menu);
mMenuButton.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View view) {
showMenu();
}
});
final ImageButton navBackButton = (ImageButton) findViewById(R.id.nav_back);
--- a/mobile/android/base/resources/layout/tabs_panel_default.xml
+++ b/mobile/android/base/resources/layout/tabs_panel_default.xml
@@ -44,17 +44,17 @@
<ImageButton android:id="@+id/add_tab"
style="@style/UrlBar.ImageButton"
android:layout_width="@dimen/tabs_panel_button_width"
android:padding="@dimen/browser_toolbar_button_padding"
android:src="@drawable/tab_new"
android:contentDescription="@string/new_tab"
android:background="@drawable/action_bar_button_inverse"/>
- <FrameLayout android:id="@+id/menu"
+ <FrameLayout android:id="@+id/tabs_menu"
style="@style/UrlBar.ImageButton"
android:layout_width="@dimen/tabs_panel_button_width"
android:background="@drawable/action_bar_button_inverse"
android:contentDescription="@string/menu">
<ImageView
style="@style/UrlBar.ImageButton"
android:layout_width="wrap_content"