From 08e6bc4e431d18afc1f7ca751988822726023ad6 Mon Sep 17 00:00:00 2001 From: Hendra Wijaya Djiono Date: Mon, 8 Jan 2018 10:25:47 +0700 Subject: [PATCH] Update README.md --- README.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7ab3b80..10b60c2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,14 @@ # RandomNumberAnimation -Easily create random number change animation to a TextView +Easily create random number change animation to a TextView and other subclasses of TextView + +Direct subclasses: +Button, CheckedTextView, Chronometer, DigitalClock, EditText, TextClock + +Indirect subclasses: +AutoCompleteTextView, CheckBox, CompoundButton, ExtractEditText, MultiAutoCompleteTextView, RadioButton, Switch, ToggleButton Release - + [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-RandomNumberAnimation-blue.svg?style=flat)](https://android-arsenal.com/details/1/6640) [![Build Status](https://travis-ci.org/IONsoft-Indonesia/RandomNumberAnimation.svg?branch=master)](https://travis-ci.org/IONsoft-Indonesia/RandomNumberAnimation) @@ -23,7 +29,7 @@ allprojects { ### Step 2. Add the dependency ```gradle dependencies { - compile 'com.github.IONsoft-Indonesia:RandomNumberAnimation:1.1' + compile 'com.github.IONsoft-Indonesia:RandomNumberAnimation:1.2' } ``` ### Step 3. Initialize @@ -57,6 +63,21 @@ randomNumberAnimation.stop() // or randomNumberAnimation.stop(true) // to keep the random number change inside the text ``` + +### Optional +You can also specify the delay between frames or frame per second +#### Java +```java +randomNumberAnimation.setDelay(16); +// or +randomNumberAnimation.setFPS(60); +``` +#### Kotlin +```kotlin +randomNumberAnimation.delay = 16 +// or +randomNumberAnimation.setFPS(60) +``` **You must call stop() when you call start(), or it will cause memory leak. To make sure it will be stopped, you can call that also in your Activity's onStop() method. See example project for more reference** ## License ```