Android shape usage
Android shape usage
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" sets the Radius of the four corners
Android: topLeftRadius = "20dp" sets the radius in the upper left corner.
Android: topRightRadius = "20dp" sets the radius in the upper right corner.
Android: bottomLeftRadius = "20dp" sets the radius in the lower right corner.
Android: bottomRightRadius = "20dp" sets 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 width of Edge
Android: color = "@ android: color/black" sets the edge color
Android: dashWidth = "2dp" set the width of the dotted line
Android: dashGap = "20dp" sets the interval width of the dotted line.
Gradient: No gradient effect after the fill color is set. The angle value must be a multiple of 45 (including 0) and only valid in type = "linear". Otherwise, an error is returned. Android: useLevel.
Start Point of the angle value