Code example for ScaleAnimation

Methods: setAnimationListener

0
	} 
	 
	private void animateTop(long duration) {
		// Utils.logFrame("top", mLetterboxTop); 
		float topScale = (float) mLetterboxHeight / (float) mLetterboxTop.getHeight();
		ScaleAnimation topAnimation = new ScaleAnimation(1, 1, 1, topScale, 0, 0);
		topAnimation.setAnimationListener(new AnimationListener() {
 
			public void onAnimationEnd(Animation animation) {
				mLetterboxTop.clearAnimation(); // TODO: Find out why is this needed.
				layoutTop(); 
			} 
 
			public void onAnimationRepeat(Animation animation) {}
			public void onAnimationStart(Animation animation) {}}
		); 
		configureAndStart(mLetterboxTop, topAnimation, duration);
	} 
	 
	private void animateBottom(long duration) {
		// Utils.logFrame("bottom", mLetterboxBottom);