Android How to change the application title
HI I need to change the application title as when i move to new tab.
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 doi开发者_运维技巧ng this?
You can simply call the setTitle()
function from within your Activity
. It takes either an int
(resource ID) or a CharSequence
as a parameter.
android:label in AndroidManifest.xml is using reference to @string/app_name for user readable application name (app name in applications list or name under icon on main screen if you add shoutcut)
For changing Activity title you should use setTitle() of Activity class.
then you have to set the custom title for your app. check my post.
You have to set a custom layout for your title. you can access the TextView
object from that.
Edit:
Accept Apologize. i didnt read the question propely.
setTitle() method is enough. My answer is about to customizing the title.that is color, text size and all.
精彩评论