Bug 1150742 - Remove new_tablet from tab_strip. r=mhaigh
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 12 Aug 2015 14:14:33 -0700
changeset 257685 ca869c691300df4d18aa8170b53d7c34cf7499f6
parent 257684 58951259f8f967eed241f913490ed7573a566d38
child 257686 03b4d313d6d61d5ac05b135460e7e1ef86bdafe9
push id29225
push userkwierso@gmail.com
push dateThu, 13 Aug 2015 23:31:33 +0000
treeherdermozilla-central@4e883591bb5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs1150742
milestone43.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 1150742 - Remove new_tablet from tab_strip. r=mhaigh This involved renaming the existing tab_strip layout to tab_strip_inner as it was originally contained within the new_tablet_tab_strip layout.
mobile/android/base/resources/layout-large-v11/new_tablet_tab_strip.xml
mobile/android/base/resources/layout-large-v11/tab_strip.xml
mobile/android/base/resources/layout-large-v11/tab_strip_inner.xml
mobile/android/base/resources/layout/gecko_app.xml
mobile/android/base/resources/values/layout.xml
mobile/android/base/tabs/TabStrip.java
deleted file mode 100644
--- a/mobile/android/base/resources/layout-large-v11/new_tablet_tab_strip.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<org.mozilla.gecko.tabs.TabStrip
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/text_and_tabs_tray_grey"/>
--- a/mobile/android/base/resources/layout-large-v11/tab_strip.xml
+++ b/mobile/android/base/resources/layout-large-v11/tab_strip.xml
@@ -1,26 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <org.mozilla.gecko.tabs.TabStripView
-        android:id="@+id/tab_strip"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_weight="1"
-        android:paddingTop="8dp"/>
-
-    <!-- The right margin creates a "dead area" on the right side of the button
-         which we compensate for with a touch delegate. See TabStrip -->
-    <org.mozilla.gecko.widget.ThemedImageButton
-        android:id="@+id/add_tab"
-        style="@style/UrlBar.ImageButton"
-        android:layout_width="@dimen/new_tablet_tab_strip_height"
-        android:src="@drawable/tab_strip_add_tab"
-        android:contentDescription="@string/new_tab"
-        android:layout_marginRight="9dp"
-        android:background="@drawable/tab_strip_button"/>
-
-</merge>
+<org.mozilla.gecko.tabs.TabStrip
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/text_and_tabs_tray_grey"/>
copy from mobile/android/base/resources/layout-large-v11/tab_strip.xml
copy to mobile/android/base/resources/layout-large-v11/tab_strip_inner.xml
--- a/mobile/android/base/resources/layout/gecko_app.xml
+++ b/mobile/android/base/resources/layout/gecko_app.xml
@@ -95,17 +95,17 @@
 
         <LinearLayout android:id="@id/browser_chrome"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:orientation="vertical">
 
             <ViewStub android:id="@+id/new_tablet_tab_strip"
                       android:inflatedId="@id/new_tablet_tab_strip"
-                      android:layout="@layout/new_tablet_tab_strip"
+                      android:layout="@layout/tab_strip"
                       android:layout_width="match_parent"
                       android:layout_height="@dimen/new_tablet_tab_strip_height"
                       android:visibility="gone"/>
 
             <org.mozilla.gecko.widget.GeckoViewFlipper
                 android:id="@+id/browser_actionbar"
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/browser_toolbar_height_flipper"
--- a/mobile/android/base/resources/values/layout.xml
+++ b/mobile/android/base/resources/values/layout.xml
@@ -5,12 +5,12 @@
 
 <resources>
     <item type="layout" name="tabs_layout_item_view">@layout/tabs_item_row</item>
 
     <!-- These items are v11+ resources but are referenced in code shipped with
          API 9 builds. Since v11+ resources don't ship on API 9 builds, in order
          for the resource ID to be found (and thus compilation to succeed), we
          provide dummy values below. -->
-    <item type="layout" name="new_tablet_tab_strip">@null</item>
+    <item type="layout" name="tab_strip">@null</item>
     <item type="layout" name="new_tablet_tabs_item_cell">@null</item>
     <item type="layout" name="tabs_panel_back_button">@null</item>
 </resources>
--- a/mobile/android/base/tabs/TabStrip.java
+++ b/mobile/android/base/tabs/TabStrip.java
@@ -35,17 +35,17 @@ public class TabStrip extends ThemedLine
     public TabStrip(Context context) {
         this(context, null);
     }
 
     public TabStrip(Context context, AttributeSet attrs) {
         super(context, attrs);
         setOrientation(HORIZONTAL);
 
-        LayoutInflater.from(context).inflate(R.layout.tab_strip, this);
+        LayoutInflater.from(context).inflate(R.layout.tab_strip_inner, this);
         tabStripView = (TabStripView) findViewById(R.id.tab_strip);
 
         addTabButton = (ThemedImageButton) findViewById(R.id.add_tab);
         addTabButton.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 final Tabs tabs = Tabs.getInstance();
                 if (isPrivateMode()) {