安卓:默认AppTheme背景颜色 [英] Android: default AppTheme background colors

查看:1692
本文介绍了安卓:默认AppTheme背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是Android的AppTheme风格的默认背景颜色作为活动?

What are the default background colors for Activities in Android's AppTheme style?

我在寻找的十六进制code,或东西,我可以参考一下。它应该是一个用于光主题,一个用于DARK主题

I'm looking for the hex code, or something that I can reference. It should be one for the LIGHT theme and one for the DARK theme.

或者我在哪里可以看出来吗?我被所有的文件很乱,找不到在哪里,他们居然说色彩的地方。

Or where can I look them up? I'm confused by all the files and can't find the place where they actually say the color.

感谢您的帮助。

更新:

我发现在SDK条目 /data/values​​/colors.xml ,这是由

I found entries in the SDK in /data/values/colors.xml, which are referenced by

@android:color/background_holo_light
@android:color/background_holo_dark

但我不能把他们当成自己的看法背景色:这是给一个错误,说值是不公开的。有没有解决办法?

But I cannot put them as background color of my Views: it is giving an error saying the values are not public. Is there a workaround?

推荐答案

看看这个<一href="https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/colors.xml">colors.xml文件。如果你做一个按Ctrl-F为backround_holo_dark你可以找到十六进制code。所有其他全息主题颜色是有作为。尽情享受吧!

Check out this colors.xml file. If you do a Ctrl-F for "backround_holo_dark" you can find the hex code. All the other holo theme colors are there as well. Enjoy!

    <drawable name="screen_background_holo_light">#fff3f3f3</drawable>
    <drawable name="screen_background_holo_dark">#ff000000</drawable>
    <color name="background_holo_dark">#ff000000</color>
    <color name="background_holo_light">#fff3f3f3</color>

这篇关于安卓:默认AppTheme背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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