14
votes

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?

3

3 Answers

29
votes

That is read-only, AFAIK.

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

2
votes

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

getSupportActionBar().setTitle("yourString");
0
votes

I used:

this.setTitle("YourString");