先看一下文档对Shape Drawable的描述: Shape Drawable An XML file that defines a geometric shape, including colors and gradients.一个定义几何形状的XML文件,包括颜色和渐变. 创建一个ShpeDrawable对象 用Android:background="@drawable/xxx.xml"或相应的Java代码引用,Shape Drawable说白了就是可自定义的多样化的背景. 现在
这一类的shape定义在xml中 file location: res/drawable/filename.xml The filename is used as the resource ID.(这个文件名作为资源id) compiled resource datatype:(复杂资源的数据类型) Resource pointer to a GradientDrawable. resource reference(资源参考): In Java: R.drawable.filename In X