How to fix Action bar Sherlock tabs width inconsistency?
actionbarsherlock, android, android-actionbar
Solution
This is not a bug for two reasons:
- ActionBarSherlock is a backport of the Android 4.0 action bar UI and API to previous versions of Android. Any changes in the behavior of the action bar after Android 4.0 will not be backported. This behavior changed in Android 4.2.
- You are comparing two vastly different sizes of device. If you grab a 1280x720 XHDPI phone running Android 4.2 you'll see that two tabs span the width of the device when in portrait. Grab a 1280x768 XHDPI phone on 4.2 (e.g. Nexus 4) and you'll see the two tabs do not span the full width because the size is becoming too large to accomodate at full width.
Problem
Tabs in Android 2.2 occupying full width. Tabs in Android 4.2 nexus 7, tabs not occupying full width. Both having same code. using actionBarsherlock e.g. ``` 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? Should this be fixed in theme! I just want the tabs to occupy full available width