• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Scrollable tabs

bscarl88

Lurker
I am creating a template for my app using the tutorial for the tabbed layout (like the music player on moto droid) The problem is, I need 7 tabs, and some have multiple words on them. I would like to keep going with the tab idea, but I was wondering if there was away to have scrollable tabs so I can designate a size for each then scroll through them horizontally. Any help is greatly appreciated!
 
After I played with the code some more, I ended up figuring it out. you have to wrap the tabwidget in horizontalScrollView as such...

Code:
	        <HorizontalScrollView
			    android:layout_width="wrap_content"
			    android:layout_height="wrap_content">
		        	<TabWidget
			        	android:orientation="horizontal"
			            android:id="@android:id/tabs"
			            android:layout_width="wrap_content"
			            android:layout_height="wrap_content"
			            android:background="#ff000066"
			            >
		        	</TabWidget>
	        </HorizontalScrollView>
 
Back
Top Bottom