Skip to content

Commit 13194b1

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug 5534414 - Unselected tab states for Holo" into ics-mr1
2 parents 2f99bb5 + d1a956b commit 13194b1

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2011 The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
18+
<!-- Non focused states -->
19+
<item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@color/transparent" />
20+
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_holo" />
21+
22+
<!-- Focused states -->
23+
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/list_focused_holo" />
24+
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_holo" />
25+
26+
<!-- Pressed -->
27+
<!-- Non focused states -->
28+
<item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/list_pressed_holo_dark" />
29+
<item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" />
30+
31+
<!-- Focused states -->
32+
<item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_holo" />
33+
<item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" />
34+
</selector>

core/res/res/values/styles.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,7 @@ please see styles_device_defaults.xml.
18231823
</style>
18241824

18251825
<style name="Widget.Holo.Tab" parent="Widget.Holo.ActionBar.TabView">
1826+
<item name="android:background">@android:drawable/tab_indicator_holo</item>
18261827
<item name="android:layout_width">0dip</item>
18271828
<item name="android:layout_weight">1</item>
18281829
<item name="android:minWidth">80dip</item>
@@ -1910,7 +1911,7 @@ please see styles_device_defaults.xml.
19101911
</style>
19111912

19121913
<style name="Widget.Holo.ActionBar.TabView" parent="Widget.ActionBar.TabView">
1913-
<item name="android:background">@drawable/tab_indicator_holo</item>
1914+
<item name="android:background">@drawable/tab_indicator_ab_holo</item>
19141915
<item name="android:paddingLeft">16dip</item>
19151916
<item name="android:paddingRight">16dip</item>
19161917
</style>
@@ -2277,6 +2278,10 @@ please see styles_device_defaults.xml.
22772278
</style>
22782279

22792280
<style name="Widget.Holo.Light.Tab" parent="Widget.Holo.Light.ActionBar.TabView">
2281+
<item name="android:background">@android:drawable/tab_indicator_holo</item>
2282+
<item name="android:layout_width">0dip</item>
2283+
<item name="android:layout_weight">1</item>
2284+
<item name="android:minWidth">80dip</item>
22802285
</style>
22812286

22822287
<style name="Widget.Holo.Light.ActionBar.TabBar" parent="Widget.Holo.ActionBar.TabBar">

0 commit comments

Comments
 (0)