So ,I suppose the title says it all.
I gave my action bar a color using this code and I want to change the color of the tab indicator ,yet there seems to be no method implemented and pretty much everything I found so far ,is way too complicated for a simple default color change.
actionBar.setStackedBackgroundDrawable(new ColorDrawable(Color.GREEN));
Can anyone guide me through this thing ,please?
My best guess is that I have to change the default color (It's some lightish blue) ,to whatever I need, but I have no clue where the XML file for this specific thing is.
Any other solution is highly appreciated ,but please don't send me "Android Action Bar Style Generator" ,I really hate so called generated things and stuff like this.I want to do everything as low level as possible.
If any other information is needed ,leave a comment, I will respond asap.
I think the indicator color use this
<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_holo" />
<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/tab_unselected_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/tab_unselected_pressed_holo" />
<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>
Simply change the drawable and set it to what you like. Note that those are 9 patch drawable. you can also use ColorFilter to change the color of them programmatically.