简体   繁体   中英

Could Resource xml can be called from layout.xml?

i just come trough a doubt

We had rexource XML and Layout

we can call another layout.xml by this way

<include layout="@layout/content_main" />

in same way can we call @xml ? Just a doubt

and I know we can so it from code java by (R.XML.ook); Is there any other way from layout ?

Thank you

It's impossible. I'm wondering what is your purpose when you want to call @xml in layout file?

Layout file can only include View and ViewGroup. So only view tag (TextView, Button,...) or layout tag (include, merge tag) or ViewStub are available for using in layout file. xml file can have many invalid tags, so it can't be use in layout file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM