是Android 5.0:HOWTO变化概述屏幕任务标题背景颜色 [英] Android 5.0: howto change Overview Screen Task Title background color
问题描述
全新的Android 5.0棒棒糖概述屏幕功能每个应用程序的任务与截图和一个(默认)灰色的标题栏。
The new Android 5.0 Lollipop Overview Screen features each App's Task with a screenshot and a (by default) grey title bar.
有些棒棒糖应用程序(例如新的Play商店)使用不同的颜色。如何能在概述屏幕标题背景的颜色改变?
Some Lollipop Apps (For example the new Play Store) use different colours. How can the colour of the Overview Screen title background be changed?
推荐答案
在一般情况下,如果你的目标物质,那么你应该设置 colorPrimary
(操作栏,最近通话) , colorPrimaryDark
(状态栏)和 colorAccent
在你的主题(检查框,进度条等)。
In general, if you're targeting Material then you should set colorPrimary
(action bar, recents), colorPrimaryDark
(status bar), and colorAccent
(check boxes, progress bars, etc) in your theme.
这就是说,你可以动态地改变颜色[最近被别的东西使用:
That said, you can dynamically change the recents color to be something else using:
TaskDescription taskDesc = new TaskDescription(myTitle, myIcon, myColor);
myActivity.setTaskDescription(taskDesc);
这篇关于是Android 5.0:HOWTO变化概述屏幕任务标题背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!