user1217885
user1217885

Reputation:

include tag in android manifest xml

how can we use include tag in layout.xml. Also by using this what are the features we can implement.

<include> </include>

Upvotes: 0

Views: 2129

Answers (2)

Manju
Manju

Reputation: 742

include is normally used to reuse the layouts if suppose you are doing app which consists of common header and footer layouts you can use like this

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:background="@drawable/bg1" android:orientation="vertical">

    <!—header layout->
    <include android:id="@+id/container_header_lyt"
        android:layout_height="wrap_content" android:layout_width="fill_parent"
            layout="@layout/main" />
<!—contains other views in layout>
</LinearLayout>

in this case you are reusing layout main

Upvotes: 1

Alexander
Alexander

Reputation: 48262

But according to http://developer.android.com/guide/topics/manifest/manifest-intro.html no such tag is allowed

Upvotes: 0

Related Questions