Android 在另一个布局中包含一个布局

Android 在另一个布局中包含一个布局,android,android-layout,android-scrollview,Android,Android Layout,Android Scrollview,我有一个主布局。 在这一个我想包括另一个布局,我有。 因此,当我在主布局中添加布局时,在运行应用程序时只显示包含的布局 这是main.xml footer.xml 当我运行应用程序时,它只显示footer.xml布局。 请帮助我找到解决方案将此属性添加到您的- <include android:id="@+id/myfotterId" layout="@layout/footer" android:layout_be

我有一个主布局。 在这一个我想包括另一个布局,我有。 因此,当我在主布局中添加布局时,在运行应用程序时只显示包含的布局

这是main.xml

footer.xml

当我运行应用程序时,它只显示footer.xml布局。
请帮助我找到解决方案

将此属性添加到您的-

<include
            android:id="@+id/myfotterId"
            layout="@layout/footer" 
            android:layout_below="@+id/imageView3">
并根据您的要求对其进行评估。

您包含的布局可能会覆盖整个屏幕,即尺寸较大。 指定包含布局的位置android:layout_lower=或android:layout_lower=etc

使用

 <include
       android:id="@+id/myfotterId"
       android:layout_width="fill_parent"
       android:layout_height="37dp" 
       layout="@layout/footer" /> 

您将看到这两种xml

我必须添加此行的地方仍然相同的问题可以使用我的xml代码检查我已经发布了完整的代码@+id/imageView3之后,我必须包含布局如果您为该属性提供了值,它现在工作了吗?在relativeLayout中,您必须指定视图相对于其他视图的位置,但在xml中,include块只有两个atribute,您必须在下面添加android:layout\u或其他类似的atribute。
<include
            android:id="@+id/myfotterId"
            layout="@layout/footer" 
            android:layout_below="@+id/imageView3">
 <include
       android:id="@+id/myfotterId"
       android:layout_width="fill_parent"
       android:layout_height="37dp" 
       layout="@layout/footer" /> 
         android:layout_height="xxdp"