![API](https://camo.githubusercontent.com/2e990b39ea4c601a696fb61051cc2007c06feb3ce18041352f461a26ae2ce3f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4150492d31362532422d627269676874677265656e2e7376673f7374796c653d666c6174)
![](https://raw.githubusercontent.com/doctor-blue/MoonyProgressBar/main/./images/image1.gif)
![](https://raw.githubusercontent.com/doctor-blue/MoonyProgressBar/main/./images/image2.gif)
![](https://raw.githubusercontent.com/doctor-blue/MoonyProgressBar/main/./images/image3.gif)
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.doctor-blue:MoonyProgressBar:1.0.0'
}
This view base on CardView
<com.devcomentry.progressbarlibrary.MoonyProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.MoonyLib.ProgressBar.CustomStyleName"
android:layout_width="256dp"
android:layout_height="64dp"
android:clickable="true"
android:focusable="true"
app:cardBackgroundColor="#e5edf7"
app:cardElevation="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- Custom theme (color, message, etc.)
<style name="Widget.MoonyLib.ProgressBar.CustomStyleName" parent="Widget.MoonyLib.ProgressBar">
<item name="progressColor">@color/purple_500</item>
<item name="failedColor">@color/failedColor</item>
<item name="completedColor">@color/completedColor</item>
<item name="defaultColor">@android:color/darker_gray</item>
<item name="inProgressMess">Downloading...</item>
<item name="failedMess">Failed!</item>
<item name="pausedMess">Paused!</item>
<item name="completedMess">Completed!</item>
<item name="textSize">14sp</item>
</style>
progressBar.setState(ProgressState.IN_PROGRESS, i.toFloat())
enum class ProgressState {
IN_PROGRESS,
COMPLETED,
FAILED,
PAUSED,
PREPARE,
}
![paypal](https://camo.githubusercontent.com/0a31b77e557770b69a69849e427a3f7a6a16e8419608ed5f4ccfa24cc2eb53d8/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)