Elad Benda2
Elad Benda2

Reputation: 15472

how to extract android linearlayout to another xml file?

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

Answers (4)

M D
M D

Reputation: 47817

You should use < include > tag:Re-using Layouts with include

Upvotes: 1

Damien R.
Damien R.

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

Md Abdul Gafur
Md Abdul Gafur

Reputation: 6201

Click on you xml layout then >> Extract Include..

you able to Extract layout and automatically include in parent layout.

Thanks

Upvotes: 1

Jarvis
Jarvis

Reputation: 345

add this to ur another file under layout..

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

Reference: Check this link for more info

Upvotes: 2

Related Questions