Android 如何去掉tabhost中的水平滚动条?
我想去掉TabHost中的水平滚动条。即使TabWidget在上面,它也在那里 下面是我的xml布局Android 如何去掉tabhost中的水平滚动条?,android,layout,android-tabhost,tabwidget,Android,Layout,Android Tabhost,Tabwidget,我想去掉TabHost中的水平滚动条。即使TabWidget在上面,它也在那里 下面是我的xml布局 <?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:layou
<?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>
将其嵌套到线性布局中
<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>
...
...
...
在框架布局中对我来说很有用:
android:foreground="@null"
android:layout_marginTop="-6dp"