diff options
author | Mario Bertschler <bmario@google.com> | 2017-11-15 11:53:32 -0800 |
---|---|---|
committer | Mario Bertschler <bmario@google.com> | 2017-11-15 16:19:34 -0800 |
commit | 510a64d099aa0c87244388c314927cfacf373ce3 (patch) | |
tree | 62441bacece2721be777cc92f81c5da463d6faaf /res | |
parent | ac9408a5cd7744a8dbc66a61114665ab6e4051de (diff) | |
download | android_packages_apps_Trebuchet-510a64d099aa0c87244388c314927cfacf373ce3.tar.gz android_packages_apps_Trebuchet-510a64d099aa0c87244388c314927cfacf373ce3.tar.bz2 android_packages_apps_Trebuchet-510a64d099aa0c87244388c314927cfacf373ce3.zip |
Adding a sliding tab strip to the custom tab layout.
Bug: 68713881
Change-Id: Ib0873482f80903611f183ccf430185f40a292f8e
Diffstat (limited to 'res')
-rw-r--r-- | res/color/all_apps_tab_text.xml | 19 | ||||
-rw-r--r-- | res/layout/all_apps.xml | 8 | ||||
-rw-r--r-- | res/values/dimens.xml | 1 |
3 files changed, 25 insertions, 3 deletions
diff --git a/res/color/all_apps_tab_text.xml b/res/color/all_apps_tab_text.xml new file mode 100644 index 000000000..f0c6310ad --- /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 05f509f13..832aaeff4 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 94db0cc9d..2176c8da5 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> |