android,如何从另一个.xml文件加载linearlayout?

android,如何从另一个.xml文件加载linearlayout?,android,android-layout,Android,Android Layout,假设我有一个带有如下菜单的.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:id="@+id/linearLayout1" an

假设我有一个带有如下菜单的.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:id="@+id/linearLayout1" android:orientation="vertical">
            <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/linearLayout2">
            <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageView1" android:src="@drawable/menubtm0"></ImageView>
        </LinearLayout>
        <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/linearLayout3">
            <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menubtm1" android:id="@+id/btm_fav" android:clickable="true"></ImageView>
            <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menubtm2" android:id="@+id/btm_search" android:clickable="true"></ImageView>
            <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menubtm3" android:id="@+id/btm_browse" android:clickable="true"></ImageView>
            <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menubtm4" android:id="@+id/btm_settings" android:clickable="true"></ImageView>
        </LinearLayout>
    </LinearLayout>

将其加载到另一个xml文件中的最佳方式是什么? 比如说进入一些FormLayout什么的


谢谢

您可能正在查找标签。

可能是标签的副本