美文网首页
Android自定义圆形复选框

Android自定义圆形复选框

作者: 杰奎琳子 | 来源:发表于2020-07-25 12:42 被阅读0次

circle_grey.xml

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

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

    android:shape="rectangle">

        android:width="1dp"

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

    <corners android:radius="50dp" />

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

        android:angle="270"

        android:centerColor="@color/edit_bg"

        android:centerX="0.5"

        android:centerY="0.5"

        android:endColor="@color/edit_bg"

        android:startColor="@color/edit_bg" />

</shape>

circle_selected.xml

<?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/history_task_yellow_deep" />

        android:width="50dp"

        android:height="50dp" />

        android:width="@dimen/dp_6"

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

</shape>

<View

   android:id="@+id/iv_select_icon"

    android:layout_width="@dimen/dp_16"

    android:layout_height="@dimen/dp_16"

    android:layout_alignParentRight="true"

    android:background="@drawable/circle_grey" />

相关文章

网友评论

      本文标题:Android自定义圆形复选框

      本文链接:https://www.haomeiwen.com/subject/dsxxlktx.html