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 doing this?
Yes you can. By changing the android:label field in your application node in AndroidManifest. xml . to your Splash Screen, then the Launcher Icon name will be changed to the name of your Splash Screen Class name.
Choose the Apps option for an app icon. Next, select the app icon you want to customize from the list of installed apps. Use the Tap to Edit Label button (it will also show the app name) to change the name. Then, enter the new custom name or label and select Done.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With