私はアンドロイドが初めてで、Tabspecが同じサイズでなければならないTabWidgetを1つ表示したい...内部に何があるかは関係ありません...さらに、8つのタブを表示したいので、HorizontallScrollViewを1つ追加しました私の活動は、3つだけではありません...
8 つのアクティビティを同じタブ サイズにするには、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: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>
ありがとうございました