开发者

Android layouts

Hi I wounder if i开发者_如何学Ctpossible 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜