Skip to content

Mori-hub/NiceCountDown

Repository files navigation

Nice Count Down

This is kind of a countdown function. It uses nice digital counters.

Features

  • Min and Sec
  • Optional Buttons : Pause and Stop
  • Free size : Relative Layout
  • Free background color
  • Easy Theme : Wooden, Classic, Happy, Balck, Neon, Simple
  • Get Running Function :Repeatdly to do
  • Get Finish Function: Such as handler.removeCallbacks(runnable)

⚙Installation

Install my-project with https://jitpack.io/

  dependencies {
	        implementation 'com.github.Mori-hub:NiceCountDown:1.0.0'
	}

Version

Usage

    // Call Lib 
    val countView = CountView(
            this    // Add the Activity
            ,R.id.timerPosition,  // Layout must be Relative Layout ! as a Parent
            {Toast.makeText(this, "It's Finish", Toast.LENGTH_SHORT).show()} //Function after finish
            , null  // Function in Running time, Repeatedly !!!
            , "wooden"  // You can choose a theme or null
        )

    // When you call this method , the timer will start !

        countView.startTimer(0, 20)

Explain

  • Parent Layout : This must be a Relative Layout and put anywhere
  • null : For Running Function and Finish Function
  • Show Timer: When you call main method, the layout will attach to the window
  • startTimer: When you call this method , the timer will start !

Examples

        findViewById<Button>(R.id.start).setOnClickListener {
            countView.startTimer(1, 20) // set time by Min and Sec --> 1:20

        }

🗄Optinal Buttons

    countView.buttons(
            findViewById<Button>(R.id.stop), // Optional Button , For Stop the timer
            findViewById<Button>(R.id.pause))// Optional Button , For Pause the timer

🎬Screenshots & Gifs

🚀 About Me

I'm a full stack developer...

🛠 Skills

Java, Kotlin, CSS....

Tech Stack

Important: For Gradle 7.2 & jitpack.io Please use this way : https://stackoverflow.com/a/71603699/12272687

Update: March 2022

🔗 Links

portfolio linkedin twitter Google

Feedback

If you have any feedback, please reach out to us at SR-App@outlook.com

License

MIT