Android的棒棒堂最近通话/多任务标题样式,文本始终黑 [英] Android Lollipop recents/multitasking header styling, text always black

查看:211
本文介绍了Android的棒棒堂最近通话/多任务标题样式,文本始终黑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎Theme.AppCompat.Light.DarkActionBar和Theme.AppCompat.Light之间的切换具有最近通话菜单内的文字颜色没有影响,关闭按钮。 colorPrimary 更改标题颜色,但文本和按钮总是黑色。任何想法?

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).

文档:<一href="https://developer.android.com/about/versions/android-5.0.html#Recents">https://developer.android.com/about/versions/android-5.0.html#Recents
的Javadoc:<一href="https://developer.android.com/reference/android/app/Activity.html#setTaskDescription(android.app.ActivityManager.TaskDescription)">https://developer.android.com/reference/android/app/Activity.html#setTaskDescription(android.app.ActivityManager.TaskDescription)

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)

这篇关于Android的棒棒堂最近通话/多任务标题样式,文本始终黑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆