如何创建圆形确定进度条?

问题描述 投票:0回答:1

如何创建圆形确定进度条? 像这样:

我想在Android Studio中制作一个圆形确定进度条。它看起来像这张照片。这是我的代码

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape
            android:shape="ring"
            android:thicknessRatio="16"
            android:thickness="5dp"
            android:useLevel="false">
            <solid android:color="#DDD"/>
        </shape>
    </item>

    <item>
        <rotate
            android:fromDegrees="270"
            android:toDegrees="270">
            <shape
                android:shape="ring"
                android:thicknessRatio="16"
                android:thickness="5dp"
                android:useLevel="true">
                <solid android:color="#f1908c"/>
            </shape>
        </rotate>
    </item>

</layer-list>

[圆形确定进度条应如下图所示] [1]:https://i.stack.imgur.com/ope29.png

xml android-layout android-drawable android-vectordrawable xml-drawable
1个回答
0
投票

github 上有几个库。

您可以尝试这个这个这个

© www.soinside.com 2019 - 2024. All rights reserved.