How to get rid of horizontal scrollbar in tabhost?

I want to get rid of the horizontal scrollbar in TabHost. It is there even if the TabWidget is on top.

alt text http://img341.imageshack.us/img341/1879/brokentabs.png

Below is my xml layout.

<?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="bottom" /> </TabHost> 
+3
android layout android-tabhost tabwidget
Jul 14 2018-10-14T00:
source share
2 answers

Insert it in Linringayout

  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal"> <TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > ... ... ... </TabHost> </LinearLayout> 
+3
Jul 15 2018-10-15T00:
source share

Assuming this worked for me in the frame layout:

 android:foreground="@null" android:layout_marginTop="-6dp" 
+2
May 20 '11 at 10:09 a.m.
source share



All Articles