画圆环代码如下:

 

画圆环,外边的边界宽度大一点即可:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:andro
    android:shape="oval"
    android:useLevel="false" >

    <solid android:color="@color/deliveryTop" />

    <stroke
        android:width="3dp"  //值越大,里面圆越小
        android:color="@color/deliveryBottom" />

    <size
        android:height="15dp"
        android:width="15dp" />

</shape>

  

 

画矩形,代码如下:

 

 

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:andro >

    <solid android:color="@color/dark_blue" />

    <stroke
        android:width="2px"
        android:color="#ffffff" />

    <corners
        android:bottomLeftRadius="5dp"
        android:bottomRightRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp" />

</shape>

  

 

相关文章:

  • 2022-12-23
  • 2021-09-13
  • 2021-07-07
  • 2022-12-23
  • 2021-11-06
  • 2021-12-12
  • 2021-08-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-07-15
  • 2021-07-25
  • 2021-11-02
相关资源
相似解决方案