summaryrefslogtreecommitdiff
path: root/res/drawable
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-05-29 17:55:49 -0700
committerAndrew Lee <anwlee@google.com>2014-05-30 10:17:35 -0700
commit7d164bbbe5f93dc3447c1d7931aea97f092677ad (patch)
treeeef57d78e97c03aac106cdffafe673564ae85c14 /res/drawable
parent09a4b071d8efcccb5ec620602a9c0dd63836f46a (diff)
Add dynamically scrolling underline to view pager tabs.
- Implementation is lifted and simplified from Play Store's implementation of PlayTabContainer and PlayTabStrip (see links in bug) - Replace mChild in ViewPagerTabs with the TabStrip. - Add new transparent background (with ripple) for tabs. - Restyle tab thickness (to 2dp) and color (to yellow) accent.. Bug: 15167378 Change-Id: I50136294a7210ead67553a82916fd09d52077860
Diffstat (limited to 'res/drawable')
-rw-r--r--res/drawable/view_pager_tab_background.xml25
1 files changed, 25 insertions, 0 deletions
diff --git a/res/drawable/view_pager_tab_background.xml b/res/drawable/view_pager_tab_background.xml
new file mode 100644
index 000000000..7dae671ad
--- /dev/null
+++ b/res/drawable/view_pager_tab_background.xml
@@ -0,0 +1,25 @@
+<?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
+ -->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:tint="@color/tab_ripple_color">
+ <item>
+ <selector>
+ <item android:state_focused="true"
+ android:drawable="@drawable/tab_unselected_focused" />
+ </selector>
+ </item>
+</ripple> \ No newline at end of file