Reputation: 11911
Hi I wounder if itpossible to have a view inside of a view, Iam going to have a toolbar on my android app,, and this toolbar is going to be shown in many activites, so I have xmlfile for each of the activites, and I wounder if should create an cml only for the toolbar. and then use ut in other xml files.
How is that possible, so i don't have dublicated xl data.
Upvotes: 0
Views: 241
Reputation: 28665
yes, you can use the include tag:
<include android:id="@+id/toolbarInclude" layout="@layout/toolbar"/>
where the toolbar is defined in a separate res/layout/toolbar.xml file
Upvotes: 3