Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Bakumon/NumberAnimTextView
:crying_cat_face: 数字增加和减小动画 TextView
https://github.com/Bakumon/NumberAnimTextView
numberanim view
Last synced: about 1 month ago
JSON representation
:crying_cat_face: 数字增加和减小动画 TextView
- Host: GitHub
- URL: https://github.com/Bakumon/NumberAnimTextView
- Owner: Bakumon
- License: mit
- Created: 2016-11-27T14:52:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-19T10:01:42.000Z (over 6 years ago)
- Last Synced: 2024-08-02T01:23:03.074Z (4 months ago)
- Topics: numberanim, view
- Language: Java
- Homepage:
- Size: 229 KB
- Stars: 700
- Watchers: 12
- Forks: 101
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - NumberAnimTextView - 数字增加动画的 TextView (TextView)
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)