It seems switching between Theme.AppCompat.Light.DarkActionBar and Theme.AppCompat.Light has no effect on the text color and "close" button inside the recents menu. colorPrimary
changes the header color, but the text and button are always black. Any ideas?
For as far as I can tell you cannot change the color of the label text and close button because it is automatically set by the system. The only things that you can control are the icon, bar color, and label text via:
Activity.setTaskDescription(new ActivityManager.TaskDescription(label, icon, color));
You can test and see how the system automatically chooses the label and close button colors by supplying a dark or light color to the above function (i.e. set it to black, the text will be white and vice versa).
Docs: https://developer.android.com/about/versions/android-5.0.html#Recents
Javadocs: https://developer.android.com/reference/android/app/Activity.html#setTaskDescription(android.app.ActivityManager.TaskDescription)
-- EDIT -- Here's more details on how the platform determines the text color for the tasks.
The SystemUI app shows the recent task UI. It has a Task model Task.java:156 which detects if the contrast between your colorPrimary (specified in the task description) and white is above 3 it will use the light color. See Utilities.java:119 on how the contrast computation is done.
The text colors used for light and dark can be found here in SystemUI's colors.xml.