If anyone comes across this same issue this is the solution to it:
The only way to style your App's apprearence in the Overview Screen (also referred to as the recents screen, recent task list, or recent apps) is to set a ActivityManager.TaskDescription
. So this is how you do it:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
String label = getString(R.string.app_name);
Bitmap icon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_welcome_activity);
int color = ResourcesCompat.getColor(getResources(), R.color.colorPrimary600, null);
ActivityManager.TaskDescription taskDesc = new ActivityManager.TaskDescription(label, icon, color);
setTaskDescription(taskDesc);
}
This must be done in your Activity onCreate() method or onResume(), some say it only workds with one or another, but for me it worked in both. You only have to insert this piece of code in your top Activity code, because by default, the TaskDescription is based on the activity at the base of the task’s activity stack, so other activities that pile on will not affect the styling, unless those activities have a TaskDescription explicitly set at run time.
Note that the text color can't be forced, it is auto generated (either white/black) based on your colorPrimary color. So an alternative to set the label color to white, that even Google appears to use, would be to set a darker colorPrimary, the 600, as the TaskDescription color, as I did in the above code. Lighter colors will have the text set to black.
Also make sure you surround the setTaskDescription(taskDesc)
with a SDK version check, since this feature were only introduced on Lollipop.
A deeper explanation to this solution can be found here. Hope this helps.