Skip to content

Latest commit

 

History

History
79 lines (65 loc) · 1.96 KB

README.md

File metadata and controls

79 lines (65 loc) · 1.96 KB

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)