Adding a sliding tab strip to the custom tab layout.

Bug: 68713881

Change-Id: Ib0873482f80903611f183ccf430185f40a292f8e
diff --git a/res/color/all_apps_tab_text.xml b/res/color/all_apps_tab_text.xml
new file mode 100644
index 0000000..f0c6310
--- /dev/null
+++ b/res/color/all_apps_tab_text.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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="?android:attr/colorAccent" android:state_selected="true"/>
+    <item android:color="?android:attr/textColorTertiary"/>
+</selector>
\ No newline at end of file
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 05f509f..832aaef 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -44,8 +44,8 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"/>
 
-        <LinearLayout
-            android:id="@+id/tab_layout"
+        <com.android.launcher3.views.SlidingTabStrip
+            android:id="@+id/tabs"
             android:layout_width="match_parent"
             android:layout_height="@dimen/all_apps_header_tab_height"
             android:layout_below="@id/header_content"
@@ -56,6 +56,7 @@
                 android:layout_height="match_parent"
                 android:layout_weight="1"
                 android:text="@string/all_apps_personal_tab"
+                android:textColor="@color/all_apps_tab_text"
                 android:background="?android:attr/selectableItemBackground"/>
             <Button
                 android:id="@+id/tab_work"
@@ -63,8 +64,9 @@
                 android:layout_height="match_parent"
                 android:layout_weight="1"
                 android:text="@string/all_apps_work_tab"
+                android:textColor="@color/all_apps_tab_text"
                 android:background="?android:attr/selectableItemBackground"/>
-        </LinearLayout>
+        </com.android.launcher3.views.SlidingTabStrip>
 
     </RelativeLayout>
 
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 94db0cc..2176c8d 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -91,6 +91,7 @@
     <dimen name="all_apps_background_canvas_height">475dp</dimen>
     <dimen name="all_apps_caret_workspace_offset">18dp</dimen>
     <dimen name="all_apps_header_tab_height">50dp</dimen>
+    <dimen name="all_apps_tabs_indicator_height">2dp</dimen>
 
 <!-- Search bar in All Apps -->
     <dimen name="all_apps_header_max_elevation">3dp</dimen>