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?
That is read-only, AFAIK.
If your objective is to change the title bar of your activities, you can call setTitle()
.
我主要使用它在onCreate()方法中实用地改变actionBar的文本....非常简单!
getSupportActionBar().setTitle("yourString");
我用了:
this.setTitle("YourString");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.