Android的全息选择的列表项的颜色 [英] Android Holo Selected List Item Color

查看:239
本文介绍了Android的全息选择的列表项的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能告诉我在霍洛一个选择的列表项的相应颜色code?此外,有什么颜色,以产生全息长preSS列表项的过渡?我知道了全息颜色在colors.xml定义,但我不能确定哪些是用于选择和长期preSS列表项的过渡。先谢谢了。

Can someone tell me the corresponding color code of a selected list item in Holo? Also, what are the colors to generate a long press list item transition in Holo? I know the Holo colors are defined in colors.xml but I'm unsure which ones are used for the selection and long press list item transition. Thanks in advance.

推荐答案

如果你看一下Android的平台框架的基础上,尤其是的themes.xml 文件,你会找到回答你的问题:

If you have a look at Android's platform framework base, especially the themes.xml file, you will find the answer to your question:

<一个href="https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml">https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml

这个文件定义,除其他外,以下两个河洛主题和相应的项目:

This file defines, amongst others, the following two Holo themes and its corresponding items:

Theme.Holo:

<style name="Theme.Holo">
    ...
    <item name="colorPressedHighlight">@color/holo_blue_light</item>
    <item name="colorLongPressedHighlight">@color/holo_blue_bright</item>
    ...
</style>

Theme.Holo.Light:

<style name="Theme.Holo.Light" parent="Theme.Light">
    ...
    <item name="colorPressedHighlight">@color/holo_blue_light</item>
    <item name="colorLongPressedHighlight">@color/holo_blue_bright</item>
    ...
</style>

我觉得这是两个颜色,你正在寻找。
这些颜色被翻译成以下的十六进制codeS:

I think these are the two colours you are looking for.
The colours are translated into the following hex codes:

<!-- A light Holo shade of blue -->
<color name="holo_blue_light">#ff33b5e5</color>

<!-- A really bright Holo shade of blue -->
<color name="holo_blue_bright">#ff00ddff</color>

这篇关于Android的全息选择的列表项的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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