我想在每个选项卡中使用多个CheckBox
,但即使我在 LinearLayout 下有三个框,也只有一个框显示在选项卡中。
我也为每个复选框设置了 ID。
这是正在使用的代码。
主文件
<?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" >
<TabWidget
android:id="@android:id/tabs"
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
android:id="@+id/widget43"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<CheckBox
android:id="@+id/root"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Tortillas" />
<CheckBox
android:id="@+id/root1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Tortillas1" />
<CheckBox
android:id="@+id/roo2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Tortillas2" />
</LinearLayout>
</FrameLayout>
</TabHost>