I am developing an Android application using the library ActionBarSherlock. In one action, I use the navigation tab in combination with the folded one ActionBar(action items below).
In this picture, you can see Activityin your current state : tabs are inserted in the second row.

In the following figure, you can see the Activityway I want: the tabs should be on the top line, and not on the second line. I already read the documentation ActionBarand ActionBarSherlock, but did not find a way to force this behavior.

This is the current code used to create ActionBar.
public class AdminActivity extends SherlockFragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ActionBar.Tab itemsTab = actionBar.newTab().setText(R.string.label_tab_items);
ActionBar.Tab usersTab = actionBar.newTab().setText(R.string.label_tab_users);
actionBar.addTab(itemsTab);
actionBar.addTab(usersTab);
}
Any ideas?
source
share