Android shape usage
In many cases, you need to customize the background of Android. The following are common attributes.
Shape is used to set the shape. It can be used in selector, layout, and so on. There are 6 sub-labels. Each attribute is as follows:
Fill: Set the fill color
Interval: Set the interval in four directions.
Size: set the size.
Rounded corner: if five attributes are set at the same time, the Radius attribute is invalid.
Android: Radius = 20dp set the Radius of the four corners
Android: topLeftRadius = 20dp: Set the radius in the upper left corner.
Android: topRightRadius = 20dp set the radius in the upper right corner
Android: bottomLeftRadius = 20dp
Android: bottomRightRadius = 20dp: Set the radius in the lower left corner.
Stroke: The dashWidth and dashGap attributes. If one of them is set to 0dp, the border is the implemented border.
Android: width = 20dp set the Edge width
Android: color = @ android: color/black sets the edge color
Android: dashWidth = 2dp set the width of the dotted line
Android: dashGap = 20dp set the interval width of the dotted line