开发者

Nested XML layout file

开发者 https://www.devze.com 2023-04-01 04:41 出处:网络
Is there a way in android to refer a xml layout file from开发者_StackOverflow another layout file. To explain better,

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

0

精彩评论

暂无评论...
验证码 换一张
取 消