的Andr​​oid如何改变应用程序的标题 [英] Android How to change the application title

查看:108
本文介绍了的Andr​​oid如何改变应用程序的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI 我需要改变应用程序的标题,当我移动到新的标签。

HI I need to change the application title as when i move to new tab.

我试图改变APP_NAME在string.xml不同的字符串,但是这不是我想要实际的动态变化。

i tried to change the app_name with varying string in string.xml but that is not actual dynamic change that i want.

有没有这样做的任何其他方式?

is there any alternative way of doing this?

推荐答案

您可以简单地调用<一href="http://developer.android.com/reference/android/app/Activity.html#setTitle%28java.lang.CharSequence%29"><$c$c>setTitle()从你的活动中的作用。这需要要么是 INT (资源ID)或者的CharSequence 作为一个参数。

You can simply call the setTitle() function from within your Activity. It takes either an int (resource ID) or a CharSequence as a parameter.

这篇关于的Andr​​oid如何改变应用程序的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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