I would like to change "Tab bottom line color" i followed this steps:
1. on my styles.xml
file i have:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Dgrey</item>
</style>
<style name="ActionBarTabStyle.Dgrey" parent="@android:style/Widget.Holo.ActionBar.TabView">
<item name="android:background">@drawable/tab_indicator_ab_dgrey</item>
</style>
</resources>
2. on my tab_indicator_ab_dgrey
i have:
<?xml version="1.0" encoding="utf-8"?>
<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="@drawable/tab_unselected_dgrey" />
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_dgrey" />
<!-- Focused states -->
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_focused_dgrey" />
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_dgrey" />
<!-- Pressed -->
<!-- Non focused states -->
<item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_dgrey" />
<item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_dgrey" />
<!-- Focused states -->
<item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_dgrey" />
<item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_dgrey" />
</selector>
3. in my drawable folders (hdpi, mdpi, xhdpi, xxhdpi) i have these files:
- tab_selected_dgrey.9.png
- tab_selected_focused_dgrey.9.png
- tab_selected_pressed_dgrey.9.png
- tab_unselected_dgrey.9.png
- tab_unselected_focused_dgrey.9.png
- tab_unselected_pressed_dgrey.9.png
and in my drawable folder i have:
tab_indicator_ab_dgrey.xml
file
and at the end, this is my
manifest.xml
:<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="ch.studentgrades.StudentGrades" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
I don't know why (i followed the tutorial) when i run the app doesn't change anything, the tab line color remain blue.