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>

  

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注