I have to change selected tab color in my tab activity
for example For, the selected item text should have the color # cea939
, and the unselected item color should be # d7ba60
. What should I do to change this? Actually, I tried to add text code value to apptheme_tab_indicator.xml
- but no results by the way, I use AppCompat
and if there is a solution, then this How does the variant for styles
and styles-v21
?
You can see your answer for the post, you can use custom view for tabs, And can paste the background code into the color color setting in the color setting:
tab selected tab = yourActionBar.getSelectedTab (); View Tab View = Selected Tab.getCustomView (); TextViewText = (TextView) tabw.findvibiid (RIDEIR_text_id); Text.setColor (your_text_color);
Hope this helps!
No comments:
Post a Comment