Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android:在TabActivity下面添加视图_Android_Layout_Tabview - Fatal编程技术网

Android:在TabActivity下面添加视图

Android:在TabActivity下面添加视图,android,layout,tabview,Android,Layout,Tabview,因此,我有一个包含两个选项卡的选项卡活动。在这些下面,我想再看一眼。 目前,我可以将视图放在末尾,但它仍然与当前可见选项卡末尾的内容重叠。是否有人知道如何在标签下方获得第二个视图,而不是重叠其内容的结尾 例如,如果视图只是一个文本视图,我的布局如下所示: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

因此,我有一个包含两个选项卡的选项卡活动。在这些下面,我想再看一眼。 目前,我可以将视图放在末尾,但它仍然与当前可见选项卡末尾的内容重叠。是否有人知道如何在标签下方获得第二个视图,而不是重叠其内容的结尾

例如,如果视图只是一个文本视图,我的布局如下所示:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">

    <TabHost android:id="@android:id/tabhost" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

        <LinearLayout android:id="@+id/linearLayout"
            android:orientation="vertical"
            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>
    </TabHost>

    <RelativeLayout android:id="@+id/InnerRelativeLayout" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true">

        <TextView android:id="@+id/EndView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="At the end of the screen"/>

        </RelativeLayout>
</RelativeLayout>

使用
android:below=“@id/tabhost”


...
因此,我得到“错误:在包“android”中找不到属性“below”的资源标识符”。你是说“android:layout_below=“@+id/tabhost”吗?如果我这样做,textview仍然重叠。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">
    <TabHost ...>
        ...
    </TabHost>

    <RelativeLayout android:id="@+id/InnerRelativeLayout" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:below="@id/tabhost"><!-- LOOK HERE  -->

        <TextView android:id="@+id/EndView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="At the end of the screen"/>

        </RelativeLayout>
</RelativeLayout>