thieumao

Simple Animation in Android

Sep 5th, 2015
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1.     TranslateAnimation animation = new TranslateAnimation(0, 50, 0, 100);
  2.         animation.setDuration(6000);
  3.         animation.setFillAfter(false);
  4.  
  5.         animation.setAnimationListener(new Animation.AnimationListener() {
  6.             @Override
  7.             public void onAnimationStart(Animation animation) {
  8.  
  9.             }
  10.  
  11.             @Override
  12.             public void onAnimationEnd(Animation animation) {
  13.  
  14.             }
  15.  
  16.             @Override
  17.             public void onAnimationRepeat(Animation animation) {
  18.  
  19.             }
  20.         });
  21.  
  22.         btnRutLaBai.startAnimation(animation);
Advertisement
Add Comment
Please, Sign In to add comment