0
現在、HoneyCombタブレットのポートフォリオアプリケーションを開始しました。私はActionBar.Tabを使用して、各タブのActionBarとFragmentに3つのタブを実装しています。 「About」、「Gallery」、「Settings」の3つのタブ名。設定ActionBar.Tabでは、私はTabHostを持っています。 これは、TabHostをFragmentの中に持つ方法を意味します。事前にあなたのアイデアをありがとう! 、あなたのフラグメントでHoenyCombのフラグメント内のTabHost
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<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">
<TabWidget
android:id="@android:id/tabs"
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
</TabHost>
</LinearLayout>
TabHostメンバ変数を持っているなどonCreateViewでそれを得る:
あなたはちょうどこのmTabHost.setup()で私のお尻を保存しました。ありがとうございました。 –