8
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