1、 include标签只有layout属性是必须的
2、include标签若指定了ID属性,而你的layout也定义了ID,则你的layout的ID会被覆盖
3、在include标签中所有的android:layout_*都是有效的。
但前提是必须要写layout_width和layout_height两个属性,否则无效 。
<include
android:id="@+id/include"
layout="@layout/xml.xml" />
include要引用的那个xml:xml.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
</LinearLayout>