Code example for AlphaAnimation

Methods: setAnimationListener, setDuration

0
	     tv.setText("0 pts"); 
	     return; 
	   } 			 
	   if(count > total) return;
	   tv.setText(String.format("%s pts", count));
	   AlphaAnimation animation = new AlphaAnimation(1.0f, 0.9f);
	   animation.setDuration(1);
	   animation.setAnimationListener(new AnimationListener() {			
			public void onAnimationStart(Animation animation) {	}			
			public void onAnimationRepeat(Animation animation) { }			
			public void onAnimationEnd(Animation animation) {							
				int i = total > 1000 ? 100 : 10;
				countUp(tv, total, count + i);
			} 
	   }); 
	   tv.startAnimation(animation);
	}	 
 
	private class NextListener implements android.view.View.OnClickListener {		
		public void onClick(View v) {	
			SoundManager.start(SoundType.click);