Android's ActionBar
has a mode NAVIGATION_MODE_TABS
. Using ActionBarSherlock 3.5.1 I have set this ActionBar
and addded 5 tabs. On 2.x devices I see all tabs without horizontal scrolling. On 4.0.x I see only 3 tabs with scrollable layout. NAVIGATION_MODE_TABS
of ActionBar can contain max 3 tabs in ICS? If yes, could I hack this somehow? I know, i could create custom TabHost
, but it would be quite time consuming to implement it with ViewPager between tab views.
You don't need to hack anything. The ActionBar tabs have specific layout parameters that you can change pretty easily through a custom style. Google uses their own style to set them in the first place. You should take a look at this on creating custom styles. http://android-developers.blogspot.com/2011/04/customizing-action-bar.html Since you want them to look like they way Jake Wharton has them set in ActionBarSherlock, then you could make things even easier for yourself and just rip his styles out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With