Reputation: 43703
Is it possible to change Android application window title/label and its icon without a change of launcher icon and application name shown on application shortcut?
I mean the icons and window names as shown on the screenshot above. I am not referring to ActionBar (if exist), which is a part of layout.
Is it possible to change this dynamically by code? Is it possible to change it for each activity separately?
Upvotes: 1
Views: 232
Reputation: 54264
Lollipop added the TaskDescription
class: https://developer.android.com/reference/android/app/ActivityManager.TaskDescription.html
In any activity, you can write something like this:
ActivityManager.TaskDescription description =
new ActivityManager.TaskDescription("test", null, 0xff0000ff);
setTaskDescription(description);
Some notes:
null
for the icon will leave the default icon in place.Upvotes: 2