diff options
| author | Adam Powell <adamp@google.com> | 2011-11-07 17:43:11 -0800 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2011-11-07 17:44:22 -0800 |
| commit | d1a956b5f93e9c600b6dc8b84ae3e5e2cb21ad22 (patch) | |
| tree | 68b74a7aba3b878108850e0448e2e1f7084273cd /core | |
| parent | b1dbf8e605c29ac00dde187579bd8ff8f18d7ba3 (diff) | |
| download | frameworks_base-d1a956b5f93e9c600b6dc8b84ae3e5e2cb21ad22.zip frameworks_base-d1a956b5f93e9c600b6dc8b84ae3e5e2cb21ad22.tar.gz frameworks_base-d1a956b5f93e9c600b6dc8b84ae3e5e2cb21ad22.tar.bz2 | |
Fix bug 5534414 - Unselected tab states for Holo
Sync unselected action bar tab states with UX. Unselected states no
longer have an underline.
Leave TabWidget tabs alone; they still keep the underline for
unselected tabs.
Change-Id: I379b94aeabb9472f3b6c859507faea57f2f9b0b6
Diffstat (limited to 'core')
| -rw-r--r-- | core/res/res/drawable/tab_indicator_ab_holo.xml | 34 | ||||
| -rw-r--r-- | core/res/res/values/styles.xml | 7 |
2 files changed, 40 insertions, 1 deletions
diff --git a/core/res/res/drawable/tab_indicator_ab_holo.xml b/core/res/res/drawable/tab_indicator_ab_holo.xml new file mode 100644 index 0000000..d8a5750 --- /dev/null +++ b/core/res/res/drawable/tab_indicator_ab_holo.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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"> + <!-- Non focused states --> + <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@color/transparent" /> + <item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_holo" /> + + <!-- Focused states --> + <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/list_focused_holo" /> + <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_holo" /> + + <!-- Pressed --> + <!-- Non focused states --> + <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/list_pressed_holo_dark" /> + <item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" /> + + <!-- Focused states --> + <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_holo" /> + <item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" /> +</selector> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 8d95d86..949f01f 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -1823,6 +1823,7 @@ please see styles_device_defaults.xml. </style> <style name="Widget.Holo.Tab" parent="Widget.Holo.ActionBar.TabView"> + <item name="android:background">@android:drawable/tab_indicator_holo</item> <item name="android:layout_width">0dip</item> <item name="android:layout_weight">1</item> <item name="android:minWidth">80dip</item> @@ -1910,7 +1911,7 @@ please see styles_device_defaults.xml. </style> <style name="Widget.Holo.ActionBar.TabView" parent="Widget.ActionBar.TabView"> - <item name="android:background">@drawable/tab_indicator_holo</item> + <item name="android:background">@drawable/tab_indicator_ab_holo</item> <item name="android:paddingLeft">16dip</item> <item name="android:paddingRight">16dip</item> </style> @@ -2277,6 +2278,10 @@ please see styles_device_defaults.xml. </style> <style name="Widget.Holo.Light.Tab" parent="Widget.Holo.Light.ActionBar.TabView"> + <item name="android:background">@android:drawable/tab_indicator_holo</item> + <item name="android:layout_width">0dip</item> + <item name="android:layout_weight">1</item> + <item name="android:minWidth">80dip</item> </style> <style name="Widget.Holo.Light.ActionBar.TabBar" parent="Widget.Holo.ActionBar.TabBar"> |
