😿数字增加和降低动画 TextView
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
gif
gradle/wrapper
numberanimtextview
.gitignore
LICENSE
README.md
_config.yml
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

NumberAnimTextView

NumberAnimTextView演示gif

Features

  1. 添加前缀、后缀
  2. 支持任意大小的整数或小数
  3. 千位分隔符
  4. API 简单
  5. 支持增加和降低动画

Usage

// 设置最终值,开始动画
mNumberAnimTextView.setNumberString("98765432.75");

Option

// 设置前缀
mNumberAnimTextView.setPrefixString("¥");
// 设置后缀
mNumberAnimTextView.setPostfixString("%");
// 设置动画时长
mNumberAnimTextView.setDuration(2000);
// 设置数字增加范围
mNumberAnimTextView.setNumberString("19.75", "99.75");

// 禁用动画
mNumberAnimTextView1.setEnableAnim(false);

License

MIT