screenshot
import
step1. Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
step2. Add the dependency
dependencies {
compile 'com.github.yanjiabin:ExtendsRingPrigressBar:1.1.1'
}
how to use
in your xml
<com.github.yanjiabin.extendsringprogressbarlib.RingProgressBar
android:layout_gravity="center"
android:id="@+id/progress_bar_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_alignParentTop="true"
app:max="100" 最大進度
app:ringColor="@color/colorPrimary" 圓環的顏色
app:ringProgressColor="@color/colorPrimaryDark" 進度條的顏色
app:ringWidth="3dp" 圓環的寬度
app:style="FILL" 填充狀態和描邊狀態 還有一種是STROKE
app:textColor="@color/colorPrimary" 顯示文本的顏色
app:textIsShow="true" 是否顯示文本
app:textSize="16sp" />
在這裏希望能幫助到有需要的盆友,如果有哪裏需要優化的麻煩留言下.我會盡快修復.