Stop using boring standard progress bar...use images!
Add this to your build.gradle
file
implementation 'com.github.appersiano:imageprogressview:-SNAPSHOT'
Inside your layout.xml
<com.appersiano.progressimage.ProgressImage
android:id="@+id/vlImage"
android:layout_width="0dp"
app:imageShadowColor="#FF0000"
app:srcImage="@drawable/tree"
android:layout_height="200dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/btnAnimate"/>
and in your Activity/Fragment
btnAnimate.setOnClickListener {
vlImage.setProgress(tvValue.text.toString().toInt(), true)
}
Feel free to fork and add other functionalities! Don't forget to make a pull request!
- Alessandro Persiano - appersiano