Android选项卡活动

Android选项卡活动,android,layout,android-tabhost,tabactivity,Android,Layout,Android Tabhost,Tabactivity,你好 我尝试这样做布局: --------------------| |Tab1 | Tab2 | Tab3 | --------------------| | | | | | | --------------------| 在Tab1中,我想要另一个Tabs --------------------| |Tab1 | Tab2 | Tab3 | --------------------

你好 我尝试这样做布局:

--------------------|
|Tab1 | Tab2 | Tab3 |
--------------------|
|                   |
|                   |
|                   |
--------------------|
在Tab1中,我想要另一个Tabs

--------------------|
|Tab1 | Tab2 | Tab3 |
--------------------|
|TAB A   |  TAB B   |
--------------------|                        |
|                   |
|                   |
|                   |
--------------------|
我使用xml文件:main.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">

    <LinearLayout android:orientation="vertical"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:padding="5dp">      


        <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"
            android:padding="5dp" />

    </LinearLayout>

</TabHost>
和tablevel2.xml

<?xml version="1.0" encoding="utf-8"?>

<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/my_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"
        android:padding="5dp" />

</TabHost>
但它不起作用,因为TabB中的内容与tab1中的内容重叠。内容是另一种活动