https://github.com/even201314/numbermorphview4android
https://github.com/even201314/numbermorphview4android
android
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/even201314/numbermorphview4android
- Owner: Even201314
- Created: 2016-05-23T16:11:35.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-29T15:59:06.000Z (about 10 years ago)
- Last Synced: 2025-04-06T22:12:43.336Z (about 1 year ago)
- Topics: android
- Language: Java
- Size: 477 KB
- Stars: 263
- Watchers: 4
- Forks: 30
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
NumberMorphView4Android
======
**NumberMorphView** for Android.
Based on (https://github.com/me-abhinav/NumberMorphView)
#### Screenshot

### Download
First, Add it in your root build.gradle at the end of repositories:
```groovy
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
```
Then,Add the dependency:
```groovy
compile 'com.github.Even201314:NumberMorphView4Android:1.2.0'
```
## Usage
* XML
Add TimerView to the xml file :
```groovy
```
there are optional attributes to personalize the interface :
Color : numColor, numBackgroundColor;
Dimension : strokeWidth;
Paint Style : strokeCap(BUTT,ROUND,SQUARE), strokeJoin(MITER,ROUND,BEVEL);
* Code
```groovy
numberMorphView.interpolator = new TimerView.LinearInterpolator();
numberMorphView.setPeriod(1000);
```
We support six Interpolators :
LinearInterpolator, OvershootInterpolator, SpringInterpolator,
BounceInterpolator, AnticipateOvershootInterpolator, CubicHermiteInterpolator;
setPeriod() to set the interval time of animation;
In this vesion 1.2.0, I use handler and message to achieve the timing, the code is in [sample](https://github.com/Even201314/NumberMorphView4Android/blob/master/sample/src/main/java/com/even/sample/MainActivity.java).
## License
NumberMorphView4Android is available under the MIT license. See the LICENSE file for more info.
## Version
* Version 1.2.0