WEFX WEFX - 3 months ago 9
Android Question

How can I use stock Android colors in layout file?

I know how to define my own colors.xml file if needed, but is there a way to refer to the stock Android colors by name from a layout xml file?

ie - android:background="black"

Answer

you can use

android:background="@android:color/black"