Skip to content

Commit

Permalink
Merge pull request #34 from tounaobun/master
Browse files Browse the repository at this point in the history
Provides default implementation for AnimatorListener.
  • Loading branch information
ozodrukh committed Jun 4, 2015
2 parents 25aeca5 + 695a324 commit 4fc0f3b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import io.codetail.animation.SupportAnimator;
import io.codetail.animation.ViewAnimationUtils;
import io.codetail.animation.SupportAnimator.SimpleAnimatorListener;

public class Sample2Activity extends AppCompatActivity
implements ViewTreeObserver.OnGlobalLayoutListener{
Expand Down Expand Up @@ -95,29 +96,6 @@ public static int randomColor(){
return ColorUtils.HSLToColor(hsl);
}

static class SimpleAnimatorListener implements SupportAnimator.AnimatorListener{

@Override
public void onAnimationStart() {

}

@Override
public void onAnimationEnd() {

}

@Override
public void onAnimationCancel() {

}

@Override
public void onAnimationRepeat() {

}
}

private int mCreationIndex;
public Creation next(){
if(mCreationIndex == REVEAL_CREATORS.length){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,30 @@ public interface AnimatorListener {
void onAnimationRepeat();
}

/**
* <p>Provides default implementation for AnimatorListener.</p>
*/
public static abstract class SimpleAnimatorListener implements AnimatorListener {

@Override
public void onAnimationStart() {

}

@Override
public void onAnimationEnd() {

}

@Override
public void onAnimationCancel() {

}

@Override
public void onAnimationRepeat() {

}
}

}

0 comments on commit 4fc0f3b

Please sign in to comment.