A custom Progress Bar that looks like a Countdown.
You can see a Sample Project here and learn more on the Wiki.
This lib was based on another project but fully written in Kotlin.
<douglasspgyn.com.github.circularcountdown.CircularCountdown
android:id="@+id/circularCountdown"
android:layout_width="72dp"
android:layout_height="72dp"
app:countdownBackgroundColor="@color/colorAccent"
app:countdownForegroundColor="@color/colorPrimary"
app:countdownTextColor="@color/colorPrimaryDark"
app:countdownTextSize="24sp" />
circularCountdown.create(3, 10, CircularCountdown.TYPE_SECOND)
.listener(object : CircularListener{
override fun onTick(progress: Int) {
}
override fun onFinish(newCycle: Boolean, cycleCount: Int) {
}
})
.start()
CircularCascadeCountdown(86405000,
circularCountdownSeconds,
circularCountdownMinutes,
circularCountdownHours,
circularCountdownDays)
.listener(object : CascadeListener {
override fun onFinish() {
}
})
.start()
You just need to add the Maven Jitpack repository on Project Gradle:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
and the library dependence on Module Gradle:
dependencies {
compile 'com.github.douglasspgyn:CircularCountdown:0.3.0'
}