Reputation: 15472
I have a long android layout xml.
how can I extract a linearlayout in it to another file?
how is the including convention?
I'm using eclipse
Upvotes: 0
Views: 363
Reputation: 3373
Check out this link: http://developer.android.com/training/improving-layouts/reusing-layouts.html
Basically if you save your layout in titlebar.xml
Include it like this: <include layout="@layout/titlebar"/>
Upvotes: 0
Reputation: 6201
Click on you xml layout then >> Extract Include..
you able to Extract layout and automatically include in parent layout.
Thanks
Upvotes: 1
Reputation: 345
add this to ur another file under layout..
<include layout="@layout/urfirstlayout"/>
Reference: Check this link for more info
Upvotes: 2