bazantariq / CounterAnimationTextView

A tiny Android library makes very easier count animation of TextView.

Home Page:https://github.com/hamzaahmedkhan/CounterAnimationTextView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CounterAnimationTextView

A tiny Android library makes very easier count animation of TextView.

Usage

Include the CounterAnimationTextView widget in your layout.

      <com.github.hamzaahmedkhan.counteranimationtextview.CountAnimationTextView
          android:id="@+id/moneyPositive"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="0"
          android:textColor="@color/black"
          android:textSize="20sp" />

Animate Count with Duration

    counterAnimationTextView
        .setAnimationDuration(5000)
        .countAnimation(0, 99999)

Animate Count with DecimalFormat

    counterAnimationTextView
        .setDecimalFormat(new DecimalFormat("###,###,###"))
        .setAnimationDuration(10000)
        .countAnimation(0, 9999999)

Animate Count with interPolator

    counterAnimationTextView
        .setInterpolator(AccelerateInterpolator())
        .countAnimation(0, 9999999)

Gradle

Add the dependency to your build.gradle.

dependencies {
	implementation 'com.github.hamzaahmedkhan:CounterAnimationTextView:1.0.1'
}

If this project helps you in anyway, show your love ❤️ by putting a ⭐ on this project ✌️ ........ ALSO FEEL FREE TO FORK AND CONTRIBUTE!!

About

A tiny Android library makes very easier count animation of TextView.

https://github.com/hamzaahmedkhan/CounterAnimationTextView


Languages

Language:Kotlin 100.0%