Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : Change App Label programmatically

How can I change application label to change app name shown from java code in android? I'm refering to:

<application android:icon="@drawable/icon" android:label="@string/app_name"> 

in the Android Manifest

Is there any way to update values in strings.xml file?

like image 395
Soul Avatar asked Sep 30 '11 06:09

Soul


People also ask

Can we change app name dynamically in Android?

It's not possible by the moment. It is a fixed string in the AndroidManifest. xml file which cannot be changed at runtime.

How do I change my app label name?

Go to the app > manifests > AndroidManifest. xml file and change the android:label field in your application node in AndroidManifest.

How can I change my Android App ID?

Select Android on the top left of the Project window. So, right click over your package name under Java folder and select "Refactor" -> Rename... Click in Rename Package Button. Type the name of the new package you want, mark all options then confirm.


2 Answers

in the activity, i tried

this.setTitle("your text"); 

and it worked. I hope it's a common solution

like image 80
Mark Avatar answered Sep 17 '22 16:09

Mark


It's not possible by the moment. It is a fixed string in the AndroidManifest.xml file which cannot be changed at runtime.

like image 32
Mister Smith Avatar answered Sep 17 '22 16:09

Mister Smith