Bug 1342968 - Remove unused TabsLayout xml style attributes. r?sebastian
All TabsLayouts are RecyclerViews now.
* Orientation on a RecyclerView is set on the LayoutManager, not the
RecyclerView;
* android:listSelector doesn't apply to RecyclerView;
* android:choiceMode doesn't apply to RecyclerView.
This patch also fixes
bug 1337699 when it removes the old
android:scrollbars="horizontal" in values-land/styles.xml from back when the
tabs tray scrolled horizontally in landscape mode.
MozReview-Commit-ID: 97el99fSi5o
--- a/mobile/android/base/resources/layout/private_tabs_panel.xml
+++ b/mobile/android/base/resources/layout/private_tabs_panel.xml
@@ -14,12 +14,11 @@
<!-- Note: for an unknown reason, scrolling in the TabsLayout
does not work unless it is laid out after the empty view. -->
<view class="org.mozilla.gecko.tabs.TabsPanel$TabsLayout"
android:id="@+id/private_tabs_layout"
style="@style/TabsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:choiceMode="singleChoice"
gecko:tabs="tabs_private"/>
</merge>
--- a/mobile/android/base/resources/layout/tabs_panel_default.xml
+++ b/mobile/android/base/resources/layout/tabs_panel_default.xml
@@ -80,17 +80,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<view class="org.mozilla.gecko.tabs.TabsPanel$TabsLayout"
android:id="@+id/normal_tabs"
style="@style/TabsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:choiceMode="singleChoice"
android:visibility="gone"
gecko:tabs="tabs_normal"/>
<org.mozilla.gecko.tabs.PrivateTabsPanel
android:id="@+id/private_tabs_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
--- a/mobile/android/base/resources/values-land/styles.xml
+++ b/mobile/android/base/resources/values-land/styles.xml
@@ -1,20 +1,15 @@
<?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/. -->
<resources>
- <style name="TabsLayout" parent="TabsLayoutBase">
- <item name="android:orientation">horizontal</item>
- <item name="android:scrollbars">horizontal</item>
- </style>
-
<style name="TabsItem">
<item name="android:nextFocusDown">@+id/close</item>
</style>
<style name="TabsItemClose">
<item name="android:nextFocusUp">@+id/info</item>
</style>
--- a/mobile/android/base/resources/values-large-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-land-v11/styles.xml
@@ -1,19 +1,15 @@
<?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/. -->
<resources>
- <style name="TabsLayout" parent="TabsLayoutBase">
- <item name="android:scrollbars">vertical</item>
- </style>
-
<style name="Widget.BookmarksListView" parent="Widget.HomeListView">
<item name="android:scrollbarStyle">outsideOverlay</item>
</style>
<style name="Widget.TopSitesGridView" parent="Widget.GridView">
<item name="android:paddingLeft">55dp</item>
<item name="android:paddingRight">55dp</item>
<item name="android:paddingBottom">30dp</item>
--- a/mobile/android/base/resources/values-large/styles.xml
+++ b/mobile/android/base/resources/values-large/styles.xml
@@ -17,20 +17,16 @@
<style name="UrlBar.Button.Container">
<item name="android:layout_marginTop">6dp</item>
<item name="android:layout_marginBottom">6dp</item>
<!-- Start with forward hidden -->
<item name="android:orientation">horizontal</item>
</style>
- <style name="TabsLayout" parent="TabsLayoutBase">
- <item name="android:scrollbars">vertical</item>
- </style>
-
<style name="TabsItem">
<item name="android:nextFocusDown">@+id/close</item>
</style>
<style name="TabsItemClose">
<item name="android:nextFocusUp">@+id/info</item>
</style>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -466,23 +466,18 @@
<item name="android:background">@android:color/transparent</item>
</style>
<style name="UrlBar.ImageButton" parent="UrlBar.ImageButtonBase">
<item name="android:layout_width">@dimen/browser_toolbar_height</item>
</style>
<!-- TabsLayout -->
- <style name="TabsLayoutBase">
+ <style name="TabsLayout">
<item name="android:background">@android:color/transparent</item>
- <item name="android:listSelector">@android:color/transparent</item>
- </style>
-
- <style name="TabsLayout" parent="TabsLayoutBase">
- <item name="android:orientation">vertical</item>
<item name="android:scrollbars">vertical</item>
</style>
<style name="TabsItem">
<item name="android:nextFocusRight">@+id/close</item>
</style>
<style name="TabsItemClose">