A CirclerTimer with Animation and Timer
To use this library your minSdkVersion
must be >= 21.
In your build.gradle :
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
In your build.gradle :
dependencies {
implementation 'com.github.jaeryo2357:circleTimer:1.1.7'
}
but CircleTimer is have Error fromRelativeLayout
, so you better use Layout without RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
...
>
<com.mut_jaeryo.circletimer.CircleTimer
android:layout_width="wrap_content"
android:layout_height="200dp"
app:isOutline="true"
app:show_text="true"
app:init_position="3124"
app:outline_color="#ff0000"
app:text_color="#ff0000"
app:wheel_active_color="#ff0000"
app:wheel_background_color="#0000ff"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</com.mut_jaeryo.circletimer.CircleTimer>
You can change the wheel color, text, and outline
timer = findViewById(R.id.main_timer);
timer.setMaximumTime(3600) // 60 minute
timer.setInitPosition(2000); //default max 3600
timer.start()
// Stop and Reset() have to call after Start()
timer.stop()
timer.reset()
rectTimer.setBaseTimerEndedListener(new RectTimer.baseTimerEndedListener() { //timer 종료
@Override
public void OnEnded() {
}
});