很簡單,只需要新建一個 drawable 文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas./apk/res/android">
<stroke
android:width="1dp"
android:color="@color/color_128EE7" />
<corners android:radius="12.5dp" />
</shape>
效果

概念拓展
stroke 是用來處理邊框的,可以修改邊框粗細(xì) 和 顏色等等;
corners 可以設(shè)置邊框的圓角顯示,也可以只是設(shè)置某一個圓角;
android:bottomLeftRadius -> 設(shè)置左下圓角;
android:bottomRightRadius-> 設(shè)置右下圓角;
android: topLeftRadius --> 設(shè)置左上圓角;
android: topRightRadius --> 設(shè)置左下圓角;
|