KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a ActionBar with a logo, title, three tabs and one action item. In portrait mode everything looks good, because the tabs is moved to the stacked ActionBar, like this: __ _ __ _ __ _ __ _ __ _ __ # My title ¤ _ _ __ _ __ _ __ _ __ _ __ _ Tab 1 | Tab 2 | Tab 3 __ _ __ _ __ _ __ _ __ _ __ But in landscape mode the title gets truncated because the tabs is moved to the top ActionBar, like this: __ _ __ _ __ _ __ _ __ _ __ _ __ _ __ _ __ # My... | Tab 1 | Tab 2 | Tab 3 | ¤ __ _ __ _ __ _ __ _ __ _ __ _ __ _ __ _ __ Is there anyway I can tell the ActionBar that the title should never be truncated? If not, can I at least set the width of the title? (It is ok for me if the tabs gets moved to a stacked ActionBar even in landscape mode) EDIT: Code requested. Here it is: public class MyActivity extends SherlockFragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActionBar actionBar = super.getSupportActionBar(); actionBar.setHomeButtonEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setTitle("My Long Title"); actionBar.addTab(actionBar .newTab() .setText("Tab 1") .setTabListener( new TabListener<MyFragment>(this, "tab1", MyFragment.class, null))); actionBar.addTab(actionBar .newTab() .setTe
Tags (comma-separated)
Save Edits
Cancel