Android: default AppTheme background colors

Terry picture Terry · Nov 7, 2013 · Viewed 36k times · Source

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

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.

Thanks for your help.

Update:

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?

Answer

Jason Robinson picture Jason Robinson · Mar 26, 2015

You can use your theme's default background color by referencing the attribute:

?android:colorBackground