No description or website provided.
Java
Latest commit 8006871 May 29, 2016 @Even201314 update README.md
Permalink
Failed to load latest commit information.
.idea Add grade tracking May 23, 2016
app initial project May 23, 2016
gradle/wrapper Add grade tracking May 23, 2016
raw/master/screenshot Add screenshot May 23, 2016
sample initial project May 23, 2016
.gitignore Add gradlew May 23, 2016
README.md update README.md May 29, 2016
build.gradle initial project May 23, 2016
gradle.properties initial project May 23, 2016
gradlew Add gradlew May 23, 2016
gradlew.bat Add gradlew May 23, 2016
settings.gradle initial project May 23, 2016

README.md

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:

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

Then,Add the dependency:

compile 'com.github.Even201314:NumberMorphView4Android:1.2.0'

Usage

  • XML

Add TimerView to the xml file :

        <com.even.numbermorphview.TimerView
            android:id="@+id/numberMorphView"
            android:layout_width="52dp"
            android:layout_height="96dp"
            even:numBackgroundColor="#B6B6B6"
            even:numColor="#5D4037"
            even:strokeCap="SQUARE"
            even:strokeJoin="BEVEL" />

there are optional attributes to personalize the interface :

Color : numColor, numBackgroundColor;

Dimension : strokeWidth;

Paint Style : strokeCap(BUTT,ROUND,SQUARE), strokeJoin(MITER,ROUND,BEVEL);

  • Code
            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.

License

NumberMorphView4Android is available under the MIT license. See the LICENSE file for more info.

Version

  • Version 1.2.0