android_novice
android_novice

Reputation: 149

how to scroll the tabs in tabview

I am using six tabs in tab view. In portrait mode tab size become very small .So i want to scroll the tabs in horizontal so that size of each tab will remain original . How we can do this?

Upvotes: 4

Views: 4203

Answers (2)

Zyzz
Zyzz

Reputation: 208

There are a lot of solutions on the web for this but they're all complicated and unnecessary. If you are trying to make the tabs on the top of the screen scroll-able then you can use this simple implementation I have shown below. Hope this helps.

<HorizontalScrollView android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:fillViewport="true"
  android:scrollbars="none">

      <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />

</HorizontalScrollView>

Upvotes: 3

Sujith
Sujith

Reputation: 31

Is this what you are looking for? http://blog.uncommons.org/2011/04/18/scrolling-tabs-in-android/

Upvotes: 3

Related Questions