1

Ive made an actionbar menu file and added it to my activity. The problem is its in the wrong place. Here is an image i found on android developer webpage:

enter image description here At standard the actionbar was on location 1. When i a added a line like 'uiOptions="splitActionBarWhenNarrow"' into my manifest then the bar went to location 3. How can i make it stick to location 2 no matter what?

Also, how did they get that blue line under the action bar? :)

user1985273
  • 1,817
  • 15
  • 50
  • 85
  • What you have labeled as "2" are action bar tabs: http://developer.android.com/guide/topics/ui/actionbar.html#Tabs What you have labeled as "1" and "3" is the rest of the action bar. – CommonsWare Jan 19 '13 at 00:01
  • Sorry, im supper confused - so tabs are a different thing from action bar? I googlet it and all examples are in java - can tabs be placed in xml or only java? And if i add tabs will they appear at position 2? – user1985273 Jan 19 '13 at 00:18
  • "so tabs are a different thing from action bar?" -- there are a few ways of doing tabs in Android. One involves tabs as part of the action bar, as is described in the documentation, at the link in my previous comment. "can tabs be placed in xml or only java?" -- action bar tabs are defined in Java. "And if i add tabs will they appear at position 2?" -- that depends on the screen size and orientation. Sometimes they will be in position 2. Sometimes, 1+2+3 will all be in position 1. Sometimes, the tabs are replaced with a drop-down list. – CommonsWare Jan 19 '13 at 00:59

1 Answers1

2

You cannot change the split Action Bar functionality, it is meant to be at the bottom when it is split. What Location 2 refers to are Action Bar tabs, not a split Action Bar.

Also, that "blue line" is part of the Action Bar's theme, which you can extend. This SO answer talks about changing the tab color specifically and provides a useful website to customize everything about the bar.

Community
  • 1
  • 1
A--C
  • 36,351
  • 10
  • 106
  • 92