Search code examples
androidandroid-layoutandroid-actionbaractionbarsherlock

How to stop ActionBar Tab navigation to display as a spinner when it gets too long?


i have an action bar with a Tab navigation. While running on 3.1 everything was fine, but once i installed the app on a 4.1 device the tabs where forced to be displayed as a spinner, wrecking my layout design. Looks like the tabs are taking too much space (if i remove some of the fragments everyting looks ok again. Is there a way to stop this behaviour and display the navigation as tabs again just as in android 3.1? Does anyone know?

thanks!


Solution

  • I found the answer here. Had to set the navigation mode AFTER adding the tabs.