android shap画圆(空心圆、实心圆)

实心圆:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval"
    android:useLevel="false">
 
    <solid android:color="@color/colorWhite" />
    <stroke
        android:width="1dp"
        android:color="@color/colorWhite" />
    <size
        android:width="10dp"
        android:height="10dp" />
</shape>

  

空心圆:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval"
    android:useLevel="false">
 
    <!--<solid android:color="@color/red"/>-->
    <stroke
        android:width="1dp"
        android:color="@color/colorWhite" />
    <size
        android:width="10dp"
        android:height="10dp" />
</shape>

  

带白边的红圆

<?xml version="1.0" encoding="utf-8"?>

<shape

    xmlns:android= "http://schemas.android.com/apk/res/android"

    android:shape= "oval"

    android:useLevel= "false" >

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

    <stroke

        android:width= "1dp"

        android:color= "@color/white" />

    <size android:width= "20dp"

          android:height= "20dp" />

</shape>

  

posted @ 2019-05-28 14:36  明明一颗大白菜  阅读(9891)  评论(0编辑  收藏  举报
<-- -->