Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tabs on Main Section of ActionBar

How can i archive a Tab layout like this in Android ? The Tab Navigation is part of that Main ActionBar and is not below. PS: Im using ActionBar Sherlock

At the moment is just do:

actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

Current ActionBar

But i want a look like this:

ActionBar Design

Thanks for help, Kitesurfer

like image 723
Kitesurfer Avatar asked Dec 24 '12 12:12

Kitesurfer


2 Answers

I don't recommend doing this but you could override the ActionBar and ABS styles:

<bool name="abs__action_bar_embed_tabs">false</bool> //for ActionBarSherlock
<bool name="action_bar_embed_tabs">false</bool> //for default ActionBar
like image 142
Ahmad Avatar answered Oct 13 '22 19:10

Ahmad


Tab will be displayed in actions bar but only if action bar has space. When you are in landscape mode your tabs will move to action bar because in landscape mode action bar has more room.

like image 39
Androider Avatar answered Oct 13 '22 20:10

Androider