Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Bakumon/NumberAnimTextView

:crying_cat_face: 数字增加和减小动画 TextView
https://github.com/Bakumon/NumberAnimTextView

numberanim view

Last synced: 3 months ago
JSON representation

:crying_cat_face: 数字增加和减小动画 TextView

Awesome Lists containing this project

README

        

# NumberAnimTextView

![NumberAnimTextView演示gif](https://github.com/Bakumon/NumberAnimTextView/raw/master/gif/GIF.gif)

## Features

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

## Usage

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

## Option

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

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

## License

[MIT](https://github.com/Bakumon/NumberAnimTextView/blob/master/LICENSE)