android-下部タブTabHostを作成

942 ワード

最も重要なのはFrameLayoutの属性android:layout_Weight="1"で、少しレイアウトすれば、他は上部TabHostと同じです
<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:layout_weight="1"  -->
		<FrameLayout
			android:id="@android:id/tabcontent"
			android:layout_width="fill_parent"
			android:layout_height="fill_parent"
			android:layout_weight="1" />
		<TabWidget
			android:id="@android:id/tabs"
			android:layout_width="fill_parent"
			android:layout_height="wrap_content" />
	</LinearLayout>
</TabHost>