Skip to content

Instantly share code, notes, and snippets.

@rezaiyan
Created October 3, 2017 06:31
Show Gist options
  • Save rezaiyan/f63e501a4903e5e2d6905f992561e30f to your computer and use it in GitHub Desktop.
Save rezaiyan/f63e501a4903e5e2d6905f992561e30f to your computer and use it in GitHub Desktop.
Set animation to items list
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