有两点需要注意:
确认你整个页面是LinearLayout ,
其次 include也需要加一个布局,如:
<LinearLayout android:layout_below="@id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" > <include layout="@layout/content_main" /> </LinearLayout>
本文介绍了如何正确地在页面布局中使用LinearLayout与Include组件。确保整体页面为LinearLayout,并且在需要复用的部分使用Include标签来引入其他布局文件,通过具体的XML代码示例展示了正确的实践方法。
有两点需要注意:
确认你整个页面是LinearLayout ,
其次 include也需要加一个布局,如:
<LinearLayout android:layout_below="@id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" > <include layout="@layout/content_main" /> </LinearLayout>
5623

被折叠的 条评论
为什么被折叠?