Skip to content

Instantly share code, notes, and snippets.

@mako34
Created September 13, 2013 07:14
Show Gist options
  • Save mako34/6547563 to your computer and use it in GitHub Desktop.
Save mako34/6547563 to your computer and use it in GitHub Desktop.
android animation of ui element
mAnimation = new TranslateAnimation(0, -720, 0, 0); //use size of screen!
//mAnimation = new TranslateAnimation(fromXDelta, toXDelta, fromYDelta, toYDelta)
mAnimation.setDuration(300);
mAnimation.setFillAfter(true);
mAnimation.setRepeatCount(0);
//mAnimation.setRepeatMode(Animation.REVERSE);
myUIelement.setAnimation(mAnimation);
myUIelement.startAnimation(mAnimation);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment