开发者

Can i have same activity using different xml file

I'm creating an android app that will have multiple pages with the same layout, but the only thing that changes will be a string that is displayed 开发者_JAVA技巧on the top (using setText). Can I use a different xml file in the same activity class.., or does Android not allow that?


No problem with that. You can use in the same activity as many XML layouts as you want. Simply switch between them using setContentView()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜