jaeryo2357 / circleTimer

A CirclerTimer with Animation and Timer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleTimer-Android

A CirclerTimer with Animation and Timer

Setup

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'
}

Example

From the layout

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

From the code

	timer = findViewById(R.id.main_timer);
	timer.setMaximumTime(3600)  // 60 minute
     timer.setInitPosition(2000); //default max 3600

Start Timer

     timer.start()
     // Stop and Reset() have to call after Start()
     timer.stop()
     timer.reset()

End Timer Linstener

     rectTimer.setBaseTimerEndedListener(new RectTimer.baseTimerEndedListener() { //timer 종료
            @Override
            public void OnEnded() {

            }
        });

About

A CirclerTimer with Animation and Timer

License:Apache License 2.0


Languages

Language:Java 100.0%