Is there a way in android to refer a xml layout file from开发者_StackOverflow another layout file. To explain better,
I have a layout file named layout1.xml & layout2.xml. Is it possible for me to refer layout2.xml from layout1.xml
use this:
<include
android:id="@+id/layoutid"
layout="@layout/header" />
refer this doc:
http://android-developers.blogspot.com/2009/03/android-layout-tricks-3-optimize-by.html
edit: fixed broken link
Yes: you can use include or merge.
edit: broken links fixed
精彩评论