Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: programmatically change the application label?

Tags:

android

It doesn't seem possible, but I was hoping someone may be aware of a way. Can the label of the application (the one defined in the manifest file by android:label="@string/app_name") be set from code?

like image 801
ab11 Avatar asked Jan 24 '12 17:01

ab11


2 Answers

That is read-only, AFAIK.

If your objective is to change the title bar of your activities, you can call setTitle().

like image 180
CommonsWare Avatar answered Oct 02 '22 12:10

CommonsWare


I mostly use this to change actionBar's text pragmatically in onCreate() method....very easy!

getSupportActionBar().setTitle("yourString");
like image 39
Zohab Ali Avatar answered Oct 02 '22 10:10

Zohab Ali