Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #12 from florent37/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
florent37 committed Feb 3, 2016
2 parents 5abe2e5 + 763a265 commit dfa45e0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Add into your **build.gradle**
[![Download](https://api.bintray.com/packages/florent37/maven/ViewAnimator/images/download.svg)](https://bintray.com/florent37/maven/ViewAnimator/_latestVersion)

```groovy
compile 'com.github.florent37:viewanimator:1.0.2@aar'
compile 'com.github.florent37:viewanimator:1.0.3@aar'
compile 'com.nineoldandroids:library:2.4.0'
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ext{
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7

libraryVersion="1.0.2"
libraryVersion="1.0.3"
}

allprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,9 @@ protected void animateSequentially() {
.interpolator(new AccelerateInterpolator())
.duration(1200)
.start();

ViewAnimator
.animate(image).scaleX(0, 1).scaleY(0, 1).alpha(0, 1).descelerate().duration(500)
.thenAnimate(image).scaleX(1, 0).scaleY(1, 0).alpha(1, 0).accelerate().duration(500);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import android.support.annotation.IntRange;
import android.util.Log;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.CycleInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.TextView;

Expand Down Expand Up @@ -443,6 +445,14 @@ public AnimationBuilder interpolator(Interpolator interpolator) {
return this;
}

public ViewAnimator accelerate() {
return viewAnimator.interpolator(new AccelerateInterpolator());
}

public ViewAnimator descelerate() {
return viewAnimator.interpolator(new DecelerateInterpolator());
}

/**
* Start.
*/
Expand Down

0 comments on commit dfa45e0

Please sign in to comment.