tags:

views:

43

answers:

1

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.

+3  A: 

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

Mathias Lin