我是 android 新手,我想显示一个 TabWidget,其Tabspec 应该具有相同的大小......它们里面有什么并不重要......此外,我添加了一个 HorizontallScrollView 因为我想在其中显示 8 个选项卡我的活动,不仅3...
有人知道我必须在我的 xml 中添加什么才能让我的 8 个活动具有相同的选项卡大小吗?
<?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"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbarAlwaysDrawHorizontalTrack="true"
android:scrollbars="horizontal"/>
</HorizontalScrollView>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
</LinearLayout>
</TabHost>
谢谢