Android在XML文件中通过如下方法来设定控件为圆角:
1.首先,在drawable文件下创建一个xml文件,例如button_roundcorners.xml,内容如下:
<shape xmlns:android="
http://schemas.android.com/apk/res/android">
<corners android:radius="8dp"/>
</shape>
或者:
</shape>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<
<