Created
October 3, 2017 06:31
-
-
Save rezaiyan/f63e501a4903e5e2d6905f992561e30f to your computer and use it in GitHub Desktop.
Set animation to items list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int lastPosition = 0; | |
private void setAnimation(View viewToAnimate, int position) { | |
if (position > lastPosition) { | |
Animation animation = AnimationUtils.loadAnimation(context, R.anim.fadei_list); | |
viewToAnimate.startAnimation(animation); | |
lastPosition = position; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment