Reputation: 69
can anyone point me in the right direction for making an android layout that has multiple rows of tabs? i have about 15 tabs that are unreadable when the app opens.
Upvotes: 2
Views: 1688
Reputation: 592
I wanted to do something similar with tabs in different rows and couldn't find an easy way to do it with TabHosts, so I ended up using Fragments.
You can use the FragmentActivity to lay out your tabs (or buttons) however you want and then use Fragments to switch out the main view with a FragmentManager in the tab's OnClickHandler.
Upvotes: 0
Reputation: 1613
Well, sometime ago I ended in the same problem. My conclusions:
HorizontalScrollView
. This way, there will be 1 row of the tabs, but they will be horizontal scrollable.TabHost
, but make your own TabWidget
using buttons with selectors (which may look exactly the same like the system tabs), placed in e.g. FrameLayout
. Then you can use TabHost.setCurrentTab()
method to achive tab-like behaviour.Upvotes: 1