Is there a way to change the background color of the tab bar in the ActionBar without changing it in the one line version?
To clarify what I want: In portrait mode the ActionBar is split in two lines, the ActionBar itself and the tabs below. In landscape mode the tabs are in the actual ActionBar.
I want to change the background color of the portrait mode. If I change the background in the TabView it'll be changed for both modes. Do I have to create separate styles for those? Which brings up a second question: is there a way to know when it'll be two lines and when not?
Or am I just missing something?
I'm using ActionBarSherlock btw
To seperate styles depending on orientation you have to create in your
/res
folder a new folder calledlayout-land
(for landscape mode) andlayout-port
(in portrait mode) and put your xml files for action bar and set it's specific style (with the color you want) on each folder.To Change Actionbar Tab's color, Pls use this code:
//For Example if you want White color as Tabs background, then
In ActionBarSherlock's
values/abs__themes.xml
there isYou have to create your own theme derived from ABS
Hope this helps you.
I think you are looking for the
android:backgroundStacked
attribute of the ActionBar style:or (If using ActionBarSherlock):
for xamarin folks.