Search code examples
androidandroid-fragmentsandroid-actionbarandroid-tabs

Android: Tabbed actionbar in portrait mode


I am unsure what to search for this so all links are appreciated.

When I change the orientation of my device to portrait mode all the tabs are going below the action bar, not on it, even though there is plenty of room (I am using 2 tabs while testing on a Nexus 10). Will the tabs always appear below the action bar in portrait mode or is there a way around this?

What I want to happen:

Valid XHTML
(source: android.com)

What is happening: NOTE: this is the behavior I am getting even when there is PLENTY of room to display the tabs in the action bar:

Valid XHTML
(source: android.com)

Thanks in advance!


Solution

  • Will the tabs always appear below the action bar in portrait mode

    On small/normal screens, yes. Action bar tabs will go where the action bar implementation wants to put them... which includes them not being tabs at all in some cases, but a drop-down list instead.