Remove tab pager and related resources

Bug 30944495

Change-Id: I0b42268bf15704d507fdbacd25a8b1b9accb6cbd
diff --git a/res/color/tab_text_color.xml b/res/color/tab_text_color.xml
deleted file mode 100644
index 5ef1fe3..0000000
--- a/res/color/tab_text_color.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2014 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@color/actionbar_text_color" android:state_selected="true"/>
-    <item android:color="@color/actionbar_unselected_text_color" />
-</selector>
\ No newline at end of file
diff --git a/res/drawable-v21/view_pager_tab_background.xml b/res/drawable-v21/view_pager_tab_background.xml
deleted file mode 100644
index b9e0805..0000000
--- a/res/drawable-v21/view_pager_tab_background.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2016 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-        android:color="@color/tab_ripple_color">
-    <item android:id="@android:id/mask">
-        <color android:color="@android:color/white" />
-    </item>
-</ripple>
diff --git a/res/drawable/unread_count_background.xml b/res/drawable/unread_count_background.xml
deleted file mode 100644
index f70f84a..0000000
--- a/res/drawable/unread_count_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<shape
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle">
-    <corners android:radius="@dimen/tab_unread_count_background_radius"/>
-    <solid android:color="@color/tab_unread_count_background_color" />
-</shape>
diff --git a/res/drawable/view_pager_tab_background.xml b/res/drawable/view_pager_tab_background.xml
deleted file mode 100644
index 9f59845..0000000
--- a/res/drawable/view_pager_tab_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2014 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:state_pressed="true"
-        android:drawable="@color/tab_ripple_color"/>
-</selector>
\ No newline at end of file
diff --git a/res/layout-ldrtl/unread_count_tab.xml b/res/layout-ldrtl/unread_count_tab.xml
deleted file mode 100644
index b23ab57..0000000
--- a/res/layout-ldrtl/unread_count_tab.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<!-- layoutDirection set to ltr as a workaround to a framework bug (b/22010411) causing view with
-     layout_centerInParent inside a RelativeLayout to expand to screen width when RTL is active -->
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@drawable/view_pager_tab_background"
-    android:layoutDirection="ltr">
-    <!-- The tab icon -->
-    <ImageView
-        android:id="@+id/icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerInParent="true"/>
-    <TextView
-        android:id="@+id/count"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/tab_unread_count_background_size"
-        android:layout_marginTop="@dimen/tab_unread_count_margin_top"
-        android:layout_marginStart="@dimen/tab_unread_count_margin_left"
-        android:layout_toStartOf="@id/icon"
-        android:paddingLeft="@dimen/tab_unread_count_text_padding"
-        android:paddingRight="@dimen/tab_unread_count_text_padding"
-        android:background="@drawable/unread_count_background"
-        android:fontFamily="sans-serif-medium"
-        android:importantForAccessibility="no"
-        android:minWidth="@dimen/tab_unread_count_background_size"
-        android:textAlignment="center"
-        android:textColor="@color/tab_accent_color"
-        android:textSize="@dimen/tab_unread_count_text_size"
-        android:layoutDirection="locale"/>
-</RelativeLayout>
-
diff --git a/res/layout/people_activity.xml b/res/layout/people_activity.xml
index 9fd1a69..46f0976 100644
--- a/res/layout/people_activity.xml
+++ b/res/layout/people_activity.xml
@@ -25,18 +25,16 @@
                     android:layout_width="match_parent"
                     android:layout_height="match_parent">
 
-        <!--
-            ViewPager for swiping between tabs.  We put fragments at runtime.
-
-            (Adding them directly as the children of this view is not recommended.  ViewPager should
-            be treated like a ListView, which doesn't expect children to be added from the layout.)
-        -->
-        <android.support.v4.view.ViewPager
-            android:id="@+id/tab_pager"
-            android:layout_height="match_parent"
+        <FrameLayout
+            android:id="@+id/contacts_view"
             android:layout_width="match_parent"
-            android:layout_below="@id/toolbar_parent"
-            />
+            android:layout_height="match_parent"
+            android:layout_below="@id/toolbar_parent">
+            <FrameLayout
+                android:id="@+id/contacts_list_container"
+                android:layout_height="match_parent"
+                android:layout_width="match_parent" />
+        </FrameLayout>
 
         <FrameLayout
             android:id="@+id/contacts_unavailable_view"
diff --git a/res/layout/people_activity_tabs_lands.xml b/res/layout/people_activity_tabs_lands.xml
deleted file mode 100644
index 8d7b42b..0000000
--- a/res/layout/people_activity_tabs_lands.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<com.android.contacts.common.list.ViewPagerTabs
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/lists_pager_header"
-    android:layout_width="@dimen/people_activity_landscape_tabs_width"
-    android:layout_height="match_parent"
-    android:textAllCaps="true"
-    android:orientation="horizontal"
-    android:layout_gravity="top"
-    android:layout_weight="0"
-    android:visibility="gone"
-    android:textSize="@dimen/people_activity_landscape_tabs_text_size"
-    style="@style/ContactsActionBarTabTextStyle" />
diff --git a/res/layout/people_activity_toolbar.xml b/res/layout/people_activity_toolbar.xml
index edca3ba..3599f0c 100644
--- a/res/layout/people_activity_toolbar.xml
+++ b/res/layout/people_activity_toolbar.xml
@@ -36,17 +36,4 @@
             style="@style/ContactsToolbarStyle" />
 
     </FrameLayout>
-
-    <com.android.contacts.common.list.ViewPagerTabs
-        android:id="@+id/lists_pager_header"
-        android:layout_width="match_parent"
-        android:layout_height="?attr/actionBarSize"
-        android:textAllCaps="true"
-        android:orientation="horizontal"
-        android:layout_gravity="top"
-        android:layout_weight="0"
-        android:layout_below="@id/toolbar"
-        android:visibility="gone"
-        style="@style/ContactsActionBarTabTextStyle" />
-
 </LinearLayout>
\ No newline at end of file
diff --git a/res/layout/unread_count_tab.xml b/res/layout/unread_count_tab.xml
deleted file mode 100644
index 783f1c1..0000000
--- a/res/layout/unread_count_tab.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@drawable/view_pager_tab_background">
-    <!-- The tab icon -->
-    <ImageView
-        android:id="@+id/icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerInParent="true" />
-    <TextView
-        android:id="@+id/count"
-        android:background="@drawable/unread_count_background"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/tab_unread_count_background_size"
-        android:gravity="center"
-        android:minWidth="@dimen/tab_unread_count_background_size"
-        android:layout_marginStart="@dimen/tab_unread_count_margin_left"
-        android:layout_marginTop="@dimen/tab_unread_count_margin_top"
-        android:layout_toEndOf="@id/icon"
-        android:paddingLeft="@dimen/tab_unread_count_text_padding"
-        android:paddingRight="@dimen/tab_unread_count_text_padding"
-        android:textAlignment="center"
-        android:textSize="@dimen/tab_unread_count_text_size"
-        android:textColor="@color/tab_accent_color"
-        android:fontFamily="sans-serif-medium"
-        android:importantForAccessibility="no" />
-</RelativeLayout>
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 6f6f4e1..8dd1ba9 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -28,10 +28,6 @@
     <dimen name="contact_browser_list_top_margin">18dp</dimen>
 
     <dimen name="quick_contact_photo_container_height">360dip</dimen>
-    <!-- Height of the selection indicator of a tab. -->
-    <dimen name="tab_selected_underline_height">3dp</dimen>
-    <!-- Size of text in tabs. -->
-    <dimen name="tab_text_size">16sp</dimen>
 
     <!-- Because the "join" screen has the vertical scroll bar on right,
       we cannot use @dimen/contact_browser_list_header_left_margin as is. -->
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
index b89c2c1..baa8498 100644
--- a/res/values-sw720dp-land/dimens.xml
+++ b/res/values-sw720dp-land/dimens.xml
@@ -18,5 +18,4 @@
     <dimen name="group_editor_side_padding">64dip</dimen>
     <dimen name="contact_detail_list_top_padding">32dip</dimen>
     <dimen name="detail_contact_photo_size">256dip</dimen>
-    <dimen name="people_activity_landscape_tabs_text_size">16dp</dimen>
 </resources>
diff --git a/res/values-w470dp/dimens.xml b/res/values-w470dp/dimens.xml
deleted file mode 100644
index 2c04e5d..0000000
--- a/res/values-w470dp/dimens.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<resources>
-
-    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
-         470dp is the height of a "normal" screen. We should leave 240dp for
-         the title and menu items -->
-    <dimen name="people_activity_landscape_tabs_width">230dip</dimen>
-    <!-- The size of the text displayed in the ActionBar tabs in landscape mode.
-         Text in the tabs should must be width dependent, otherwise it won't fit in the tabs.
-         In portrait mode, the tabs look okay when overflowing their allocated space.
-         We have to be more careful in landscape. -->
-    <dimen name="people_activity_landscape_tabs_text_size">9dp</dimen>
-
-</resources>
\ No newline at end of file
diff --git a/res/values-w590dp/dimens.xml b/res/values-w590dp/dimens.xml
deleted file mode 100644
index 2fff6ca..0000000
--- a/res/values-w590dp/dimens.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<resources>
-
-    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
-         590dp is almost the height of a "large" screen. We should leave 240dp for
-         the title and menu items -->
-    <dimen name="people_activity_landscape_tabs_width">350dip</dimen>
-    <!-- The size of the text displayed in the ActionBar tabs in landscape mode.
-         Text in the tabs should must be width dependent, otherwise it won't fit in the tabs.
-         In portrait mode, the tabs look okay when overflowing their allocated space.
-         We have to be more careful in landscape. -->
-    <dimen name="people_activity_landscape_tabs_text_size">14dp</dimen>
-
-</resources>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 0cba8e6..2e7dea3 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -201,11 +201,6 @@
     <!-- Darker version of the actionbar color. Used for the status bar and navigation bar colors. -->
     <color name="actionbar_background_color_dark">#008aa1</color>
 
-    <color name="tab_ripple_color">@color/tab_accent_color</color>
-    <color name="tab_accent_color">#ffffff</color>
-    <color name="tab_selected_underline_color">@color/tab_accent_color</color>
-    <color name="tab_unread_count_background_color">#700f4b70</color>
-
     <!-- Color of the title to the Frequently Contacted section -->
     <color name="frequently_contacted_title_color">@color/actionbar_background_color</color>
 
@@ -218,7 +213,6 @@
     <color name="actionbar_text_color_black">#DF000000</color>
     <!-- Solid grey for status bar overlay-->
     <color name="actionbar_color_grey_solid">#777777</color>
-    <color name="actionbar_unselected_text_color">#a6ffffff</color>
 
     <!-- Text color of the search box text as entered by user  -->
     <color name="searchbox_text_color">#000000</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ab102fe..2eb4b22 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -238,16 +238,6 @@
     <dimen name="quickcontact_expanding_button_section_height">48dp</dimen>
     <dimen name="quickcontact_expanding_button_section_padding">8dp</dimen>
 
-    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
-         426dp is the height of a "small" screen. We should leave 240dp for
-         the title and menu items -->
-    <dimen name="people_activity_landscape_tabs_width">186dip</dimen>
-    <!-- The size of the text displayed in the ActionBar tabs in landscape mode.
-         Text in the tabs should must be width dependent, otherwise it won't fit in the tabs.
-         In portrait mode, the tabs look okay when overflowing their allocated space.
-         We have to be more careful in landscape. -->
-    <dimen name="people_activity_landscape_tabs_text_size">8dp</dimen>
-
     <!-- Top margin of the text message when provider status is busy -->
     <dimen name="update_contact_list_top_margin">188dp</dimen>
 
@@ -431,17 +421,8 @@
     <!-- Offset of bottom margin of the floating action button used when dialpad is up -->
     <dimen name="floating_action_button_dialpad_margin_bottom_offset">4dp</dimen>
 
-    <!-- Height of the selection indicator of a tab. -->
-    <dimen name="tab_selected_underline_height">2dp</dimen>
     <!-- Size of text in tabs. -->
-    <dimen name="tab_text_size">14sp</dimen>
     <dimen name="tab_elevation">2dp</dimen>
-    <dimen name="tab_unread_count_background_size">16dp</dimen>
-    <dimen name="tab_unread_count_background_radius">2dp</dimen>
-    <dimen name="tab_unread_count_margin_left">10dp</dimen>
-    <dimen name="tab_unread_count_margin_top">2dp</dimen>
-    <dimen name="tab_unread_count_text_size">12sp</dimen>
-    <dimen name="tab_unread_count_text_padding">2dp</dimen>
 
     <!-- Padding around the icon in the search box. -->
     <dimen name="search_box_icon_margin">4dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 33fa11e..528a61a 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -41,10 +41,6 @@
 
     <style name="PeopleTheme" parent="@android:style/Theme.Material.Light">
         <item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
-        <!-- Style for the tab bar (for the divider between tabs) -->
-        <item name="android:actionBarTabBarStyle">@style/ContactsActionBarTabBarStyle</item>
-        <!-- Style for the tab bar text (for text on tabs) -->
-        <item name="android:actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
         <!--  Drawable for the back button -->
         <item name="android:homeAsUpIndicator">@drawable/ic_back_arrow</item>
         <!-- Style for the overflow button in the actionbar. -->
@@ -107,12 +103,6 @@
         <!-- Styles that require AppCompat compatibility, remember to update both sets -->
         <item name="android:actionBarStyle">@style/ContactsActionBarStyleAppCompat</item>
         <item name="actionBarStyle">@style/ContactsActionBarStyleAppCompat</item>
-        <!-- Style for the tab bar (for the divider between tabs) -->
-        <item name="android:actionBarTabBarStyle">@style/ContactsActionBarTabBarStyle</item>
-        <item name="actionBarTabBarStyle">@style/ContactsActionBarTabBarStyle</item>
-        <!-- Style for the tab bar text (for text on tabs) -->
-        <item name="android:actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
-        <item name="actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
         <item name="android:actionButtonStyle">@style/ContactsActionButtonStyle</item>
         <item name="actionButtonStyle">@style/ContactsActionButtonStyle</item>
         <!--  Drawable for the back button -->
@@ -244,22 +234,6 @@
         <item name="android:textColor">@color/actionbar_text_color_black</item>
     </style>
 
-    <!-- Styling for the tab bar; handles styling of the divider line. -->
-    <style name="ContactsActionBarTabBarStyle"
-           parent="@android:style/Widget.Material.ActionBar.TabBar">
-        <item name="android:showDividers">none</item>
-    </style>
-
-    <!-- Text style for tabs. -->
-    <style name="ContactsActionBarTabTextStyle"
-           parent="android:style/Widget.Material.Light.ActionBar.TabText">
-        <item name="android:textColor">@color/tab_text_color</item>
-        <item name="android:textSize">@dimen/tab_text_size</item>
-        <item name="android:fontFamily">@string/tab_font_family</item>
-        <item name="android:elevation">0dp</item>
-        <item name="android:textStyle">bold</item>
-    </style>
-
     <!-- Action bar overflow menu icon. -->
     <style name="ContactsActionBarOverflowQP"
            parent="Widget.AppCompat.Light.ActionButton.Overflow">