要件にはTabhostを使用でき、tab.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">
<RelativeLayout android:orientation="vertical"
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"
android:layout_weight="1" >
</FrameLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:tabStripEnabled="false"
android:layout_alignBottom="@android:id/tabcontent"
android:background="#000000" />
</RelativeLayout>
</TabHost>
タブにはActionBarを使用する必要がありますか、TabHostを使用できますか? – MCeley
どちらが良いルートかわかりません。私はActionBarを使い始めました。開発者ガイドがこれを推奨しているからです。私もSDK 14に入っています。TabHostの使用を検討しています。 TabHostを使ってタブを下に置くことは可能ですか? – user1956604
はい、TabHostを使って下部に置くことができます。 – MCeley