摘抄自以下博客
https://www.cnblogs.com/popfisher/p/6238119.html
shape标签能定义多少种类型的Drawable?
shape 可以定义四种类型的几何图形,由 android:shape 属性指定
line --> 线
rectangle --> 矩形(圆角矩形)
oval --> 椭圆,圆
ring --> 圆环
矩形(边框+填充)
矩形实线边框内部无填充:rect_solid_border.xml
矩形虚线边框内部无填充:rect_dashed_border.xml
矩形实线边框-内部填充:rect_solid_border_and_fill.xml
矩形虚线边框-内部填充:rect_dashed_border_and_fill.xml
圆角矩形
圆角矩形-只有边框:rect_rounded_border.xml
圆角矩形-只有内部填充:rect_rounded_fill.xml
圆角矩形-有边框有填充:rect_rounded_border_and_fill.xml
圆角矩形-左边圆角为一个半圆弧:rect_rounded_left_arc.xml
圆角矩形-左右两边都是半圆弧:rect_rounded_left_right_arc.xml
圆角矩形-左右两边都是半圆弧-带边框:rect_rounded_left_right_arc_border.xml
圆角矩形-圆:rect_rounded_arc.xml
圆角矩形-上下两边半圆弧:rect_rounded_top_bottom_arc.xml
渐变效果(以矩形为例)
垂直线性渐变:rect_gradient_linear_vertical.xml
水平线性渐变:rect_gradient_linear_horizon.xml
对角线线性渐变:rect_gradient_linear_diagonal.xml
径向渐变:rect_gradient_radial.xml
扫描渐变:rect_gradient_sweep.xml