1

Say I have an .xml file with a menu that looks like this.

<?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>

What would be the best way to load it into another xml file? For example into some FormLayout or something?

Thanks!

1

1 Answer 1

3

You are probably looking for the Include tag.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.