Code example for TranslateAnimation

Methods: setAnimationListener, setDuration, setInterpolator

0
				} 
				postProcess(); 
				return; 
			} 
			 
			animation = new TranslateAnimation(fromXDelta, toXDelta, fromYDelta, toYDelta); 
			animation.setDuration(calculatedDuration); 
			animation.setAnimationListener(animationListener); 
			if (mState == State.FLYING && mLinearFlying) { 
				animation.setInterpolator(new LinearInterpolator()); 
			} else 
			if (mInterpolator != null) { 
				animation.setInterpolator(mInterpolator); 
			} 
			startAnimation(animation); 
		} 
	}; 
 
	private AnimationListener animationListener = new AnimationListener() {
		@Override 
		public void onAnimationEnd(Animation animation) {