Nested XML Layout File

Is there any way in android to transfer xml layout file from another layout file. To better explain

I have a layout file called layout1.xml and layout2.xml. Is it possible for me to pass layout2.xml from layout1.xml

+4
source share
2 answers

use this:

<include android:id="@+id/layoutid" layout="@layout/header" /> 

refer to this document:

http://android-developers.blogspot.com/2009/03/android-layout-tricks-3-optimize-by.html

Edit: fixed broken link

+4
source

Yes: you can use include or merge .

edit: broken links fixed

+3
source

Source: https://habr.com/ru/post/1369610/


All Articles