Git Product home page Git Product logo

circletimer's Introduction

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() {

            }
        });

circletimer's People

Contributors

jaeryo2357 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

circletimer's Issues

How to change the clock colors?

Hi there, thank you for this library.
I'd like to know if there's some kind of way to change the color of the text and lines around the clock, be it programmatically or by xml.
This is an example of what I mean:

photo_2023-01-15_20-19-56

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.