Color Drawables

You can create a PaintDrawable object that is a rectangle of color, with optionally rounded corners. This element can be defined in any of the files inside res/values/.

Source file format: XML file requiring a <?xml version="1.0" encoding="utf-8"?> declaration, and a root <resources> element containing one or more <drawable> tags.

Resource source file location: res/values/colors.xml (File name is arbitrary, but standard practice is to put the PaintDrawable items in the file along with the numeric color values.)

0 0

Post a comment