/TimeTrackerTextView

A (Time-Dependent) TextView that tracks time and updates its content accordingly.

Primary LanguageJavaApache License 2.0Apache-2.0

TimeTrackerTextView

A (Time-Dependent) TextView that tracks time and updates its content accordingly.

Platform API Download GitHub issues License

I find it rather frustrating to implement a time-dependent TextView (A TextView that updates its properties every x period). You need to setup the timer at the right moment and manage its lifecycle manually and kill it when it finishes its work before it starts leaking memory, and even if you manage to do all that work right, that much code still messes your activity up.

Example

Installation

Add This dependency to your module-level gradle file:

dependencies {
    // You can find the latest version of the library here:
    // https://github.com/mohakapt/TimeTrackerTextView/releases 
    implementation 'com.github.mohaka:time-tracker-text-view:{LATEST_VERSION}'
    
    // Add this dependency only if you want to use my PrettyTimeTracker
    // implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
}

Usage

  • Please check the example in the source code for more detailed information.

Roadmap

Contributing

If you encounter a bug or you have a feature in mind please make a pull request and i will merge it as soon as possible, if you can't (for some reason) make a pull request please open an issue and i will happily do respond to it.

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.
I will try to provide release notes with future releases.

License

This project is licensed under the Apache-2.0 license - see the LICENSE.md file for more details.