在android中常使用shape来作为控件的背景,来实现对控件形状的设计
shape的文件 位于 drawable文件中 在drawable目录下 添加 任意文件名的xml文件(myshape.xml)
<shape xmlns:android=”http://schemas.android.com/apk/res/android” >
</shape>
一 绘制圆角(corners标签)
一般文本框 可以绘制为带边框的圆角边框 默认的EditText没提供这样的演示
<!– radius 设置4个角的半径
其他 4个属性 分别可以单独设置4个角的半径
solid 填充颜色 –>
<corners
android:radius=”20dp” />
<solid android:color=”@android:color/holo_orange_light”/>