How to fix sherlock action bar insertion width inconsistency?

Tabs in Android 2.2 are full width.

enter image description here

enter image description here

Tabs in Android 4.2 nexus 7, tabs do not occupy the full width. Both have the same code. using actionBarsherlock
for example

final ActionBar actionBar = getSupportActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
// add tabs
Tab tab1 = actionBar.newTab().setText("TabTitle1")
 .setTabListener(new MyTabListener(null));
actionBar.addTab(tab1);

What am I missing? If this is fixed in the subject! I just want the tabs to occupy the full available width

+5
source share
1 answer

This is not a mistake for two reasons:

  • ActionBarSherlock is a backport of the Android 4.0 user interface interface and API for previous versions of Android. Any changes to the action of the action bar after Android 4.0 will not be returned. This behavior has changed in Android 4.2.
  • . 1280x720 XHDPI- Android 4.2, , , . 1280x768 XHDPI- 4.2 (, Nexus 4), , , , .
+7

All Articles