Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/203.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 将布局包含到首选项中_Android_Layout_Preference - Fatal编程技术网

Android 将布局包含到首选项中

Android 将布局包含到首选项中,android,layout,preference,Android,Layout,Preference,我有一个页眉和页脚的布局。我还有一个preference.xml布局。我现在要做的是将普通布局包含到preference.xml中 关于如何将普通xml布局包括到preference.xml布局中,您有什么想法吗?使用包括可以将布局添加到其他布局中: 示例: <include android:id="@+id/include1" android:layout_width="match_parent" android:layout_height="wrap_conte

我有一个页眉和页脚的布局。我还有一个preference.xml布局。我现在要做的是将普通布局包含到preference.xml中


关于如何将普通xml布局包括到preference.xml布局中,您有什么想法吗?

使用
包括
可以将布局添加到其他布局中:

示例:

<include
    android:id="@+id/include1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    layout="@layout/normal_layout" />

您可以使用标记在xml文件中包含布局

<include
android:id="@+id/header_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
layout="@layout/normal_layout" />