MonoDroid Change Activity Label or Title Programmatically

无人久伴 提交于 2019-12-24 01:54:18

问题


I have a gridview with pictures of equipment to select from. Once selected, the user is taken to an activity that summarizes all the info they need to know for that model of equipment. I'd like for the Label or Title of that activity to display the selected model of equipment.

It looks like in java to be as simple as setTitle(string), but this functionality doesn't seem to exist in mono. Looked at this, but you can only use integer or an existing drawable. I need to set it to a string.


回答1:


You can set that via the Title property. In general, where you see setFoo/getFoo methods in Java, those will be mapped to a property named Foo in C#.



来源:https://stackoverflow.com/questions/8825392/monodroid-change-activity-label-or-title-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!