a nice progressbar for android
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
compile 'com.github.flyou:NiceProgressBar:1.0.2'
}
add in you xml
<com.xdja.progressbarlibrary.NiceProgressBar
android:id="@+id/progressbar1"
android:layout_width="150dp"
android:layout_height="150dp"
/>
this.progressbar1 = (NiceProgressBar) findViewById(R.id.progressbar1);
progressbar1.setTextMax(88).show();
progressbar2.setTextMax(33)
.setTextColor(getResources().getColor(R.color.red))
.setDefaultWheelColor(getResources().getColor(R.color.sandybrown))
.setWheelColor(getResources().getColor(R.color.yellow))
.show();
setpercent type and Listener
progressbar3.setTextMax(100)
.showWithPercent(true)
.setProgressBarListener(new NiceProgressBar.ProgressBarListener() {
@Override
public void onProgressBarComplete() {
// TODO: do what you want
}
@Override
public void onProgressBarStart() {
// TODO: do what you want
}
})
.show();
}
License
NiceProgressBar is under the Apache2.0 license. See the LICENSE file for details.