Advertisement
Guest User

Untitled

a guest
Jun 28th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1.         RelativeLayout rl = (RelativeLayout)findViewById(R.id.crpl_bars);
  2.        
  3.         AlphaAnimation anim = (AlphaAnimation) AnimationUtils.loadAnimation(this, R.anim.fade_in);
  4.        
  5.         anim.setRepeatMode(Animation.RESTART);
  6.         anim.setRepeatCount(Animation.INFINITE);
  7.         LayoutAnimationController controller = new LayoutAnimationController(anim, 0.5f);
  8.        
  9.         rl.setLayoutAnimation(controller);
  10.         rl.setLayoutAnimationListener(new AnimationListener() {
  11.            
  12.             @Override
  13.             public void onAnimationStart(Animation animation) {
  14.                 // TODO Auto-generated method stub
  15.                
  16.             }
  17.            
  18.             @Override
  19.             public void onAnimationRepeat(Animation animation) {
  20.                
  21.             }
  22.            
  23.             @Override
  24.             public void onAnimationEnd(Animation animation) {
  25.                 // TODO Auto-generated method stub
  26.                
  27.             }
  28.         });
  29.        
  30.         rl.startLayoutAnimation();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement