Animated Number Text View Library
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
animatedtextview
app
gradle/wrapper
.gitignore
FSAnimatedTextView.iml
LICENSE.md
README.md
build.gradle
example1.gif
example2.gif
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

FSAnimatedTextView

License Version

Requirements

  • minAndroidSdk: 16

Installation

Add to your gradle.build:

allprojects {
  	repositories {
  		...
  		maven { url 'https://jitpack.io' }
  	}
  }
dependencies {
          compile 'com.github.danielceinos:FSAnimatedTextView:1.0.5'
  }

Use

Options

    <attr name="textSize" format="dimension"/>
    <attr name="textColor" format="color"/>
    <attr name="duration" format="integer"/>
    <attr name="leftDrawable" format="reference"/>
    <attr name="leftDrawableHeight" format="dimension"/>
    <attr name="leftDrawableWidth" format="dimension"/>
    <attr name="leftDrawableSize" format="dimension"/>
    <attr name="leftDrawableTint" format="color"/>
    <attr name="colorFeedback" format="boolean"/>

Example

 <com.fireshield.animatedtextview.FSAnimatedTV
          android:id="@+id/tv_retweet"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="6dp"
          android:layout_weight="1"
          app:colorFeedback="true"
          app:duration="200"
          app:leftDrawable="@drawable/ic_cached"
          app:leftDrawableSize="20dp"
          app:leftDrawableTint="#FFF"
          app:textColor="#FFF"
          app:textSize="16sp"
          />
	findViewById<FSAnimatedTV>(R.id.tv_number).setNum(1337)
	findViewById<FSAnimatedTV>(R.id.tv_number).setText("hey!")
	findViewById<FSAnimatedTV>(R.id.tv_like).increment(1)
	findViewById<FSAnimatedTV>(R.id.tv_like).decrement(6)