如何更改android活动标签 [英] How to change android Activity label

查看:65
本文介绍了如何更改android活动标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Activity并在清单文件中声明.但是我想将同一活动重新用于其他目的.

I have created an Activity and declared in Manifest file. But I would like to re-use the same Activity for other purpose.

 <activity
            android:configChanges="orientation|keyboardHidden"
            android:label="Main Menu"
            android:name=".MainMenu"
            android:theme="@android:style/Theme.Light" >
        </activity>

我需要动态更改标签.在此先感谢

I need to change the Label dynamically. Thanks in Advance

推荐答案

使用

setTitle(int titleId)

setTitle(CharSequence title)

这篇关于如何更改android活动标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆