Add a Shape Drawable

How to Add a Shape Drawable

A Shape Drawable is a generic shape defined in XML.

1. Create an Android project, if you don't already have one.

2. Create an XML file named thumb01.xml in the res/drawable directory.

3. Open the thumb01.xml file and add the following code.

<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#FF0000"/>
</shape>

4. To add a color for the shape, add the code between the <shape> tags. The below will set the color to red.

<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#FF0000"/>
</shape>
Related Articles:

Resources:
http://developer.android.com/guide/topics/resources/drawable-resource.html
https://code.google.com/p/android/issues/detail?id=14317