Adjust the color of the action bar and text when the application is displayed in the list of background applications

On the Lollipop device, when I use the application and then pull out the list of applications that are in the lobby, I see something like this:

Android 5.0 list of backgrounded apps

How to change the color of the action bar displayed there and the color of the text?

+4
source share
1 answer

You can use the setTaskDescription () method from your activity:

setTaskDescription(new ActivityManager.TaskDescription(label, icon, color));

Additional information: https://developer.android.com/reference/android/app/Activity.html#setTaskDescription(android.app.ActivityManager.TaskDescription)

By default, Android will accept the activity icon, activity shortcut, and color from the android: colorPrimary attribute of your theme.

+5

All Articles