アプリでタブホストを使用したい。ただし、画面の幅全体を占めるべきではありません。私は次の方法でそれをしたい
赤色の左右の余白が必要です
助けてください..
アップデート:
<com.example.Activity.MyFragmentTabHost
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_marginLeft="10dp"
android:background="@color/maroon"
>
<TabWidget
android:id="@android:id/tabs"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</com.example.Activity.MyFragmentTabHost>