在android上显示圆形进度条(实心圆圈) [英] Show Circular progress bar on android (filled circle)
问题描述
如何在android上显示一个填充的圆形进度条?
进度条应该像圆而不是圆一样填充,并且应该具有可自定义的功能,例如动画计时动画插值器等.
该项目有助于在 android 5 (lolipop) 及更高版本上显示一个简单的填充圆形进度条.它是高度可定制的,所有自定义属性都显示在下面的代码示例中.
这是一个开源项目,您可以随意查看代码或克隆它并根据您的要求对其进行修改.
How to show a filled circular progress bar on android?
The progress bar should be filled like a circle not like a ring and it should have customizable features like animation timings animation interpolators etc.
This project helps display a simple filled circular progress bar on android 5 (lolipop) and above. It is extremely customizable all the custom attributes are shown in the code sample below.
This is an open source project, feel free to look into code or clone it and modify it per your requirements.
Follow the GitHub instructions to get started
<com.jeet.circularprogressbar.CircularProgressBar
android:id="@+id/customRoundProgressBar"
android:layout_width="100dp"
android:layout_height="100dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:maxProgressLimit="60"
app:progress="50"
app:maxAnimationDuration="2500"
app:animationInterpolator="AccelerateDecelerateInterpolator"
app:showProgressText="true"
app:progressTextSize="16sp"
app:progressTextColor="@color/black"
app:progressBarColor="@android:color/holo_red_dark" />
setProgress(progressValue)
can be called from code to set the current progress of the progress bar.
Result
这篇关于在android上显示圆形进度条(实心圆圈)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!