http://blog.csdn.net/bear_huangzhen/article/details/24488337
In the development of Android programs, we often use shape to define a variety of shapes, first of all we understand what the shape of the label below, it means:
Solid: Fill
ANDROID:COLOR Specifies the color of the fill
Gradient: Gradient
Android:startcolor and Android:endcolor are the starting and ending colors, respectively,
Android:angle is a gradient angle and must be an integer multiple of 45.
In addition, the default mode of the gradient is android:type= "linear", that is, linear gradient,
You can specify a gradient as a radial gradient, android:type= "radial", and a radial gradient that requires a radius of android:gradientradius= "50".
Angle value corresponding to the location
Stroke: Stroke
Android:width= the width (thickness) of the "2DP" stroke, android:color the color of the stroke.
We can also make the stroke into a dashed form, set in the following way:
Android:dashwidth= "5DP"
android:dashgap= "3DP"
Where android:dashwidth represents the length of a horizontal line such as '-', android:dashgap indicates the spacing of strokes (blank part)
Corners: Rounded Corners
The Android:radius is the radian of the angle, and the larger the value the greater the rounded.
We can also set the four corners to different angles,
The RADIUS attribute is not valid if you set five properties at the same time
android:radius= "20DP" sets the radius of Four Corners
android:topleftradius= "20DP" sets the radius of the upper-left corner
Android:toprightradius= "20DP" set the radius of the upper-right corner
android:bottomleftradius= "20DP" setting the radius of the lower right corner
Android:bottomrightradius= "20DP" set the radius of the lower left corner
padding: Interval
You can set the interval between the top and left four directions
Go A summary of shape usage in Android