Is there a way to set actionBarTabTextStyle specifically for a stacked action bar?

I could not find a way to change the text style of the tab text depending on whether the ActionBar fits or not. Only the background seems adjustable.

I am using ActionBarSherlock . My ActionBar background is blue with white text. I use the navigation tab, so when part of the tabs fit below the main ActionBar , I want the background to be white (which I did with abBackgroundStacked ). This makes the text invisible (text of the same color as the background). I want the text to be black when the action bar is folded. Any ideas?

+6
source share
1 answer

If you use a complex ActionBar, then the tabs fit into the portrait and part of the ActionBar in the landscape.

Then simply create a style specifically for the portrait, than black text on white stacked tabs and a style for landscape mode that has white text on blue ActionBar + tabs.

Write each style in a separate styles.xml file and place it accordingly in the values ​​and values ​​- ground (for landscape) folders. This is what I did, and it works great.

0
source

Source: https://habr.com/ru/post/910018/


All Articles