Code example for ViewAnimator

Methods: getContextaddViewgetChildAtgetChildCountremoveViewAtsetInAnimationsetOutAnimationshowNext

0
	 * TODO remove 
	 * May return null 
	 */ 
	@Deprecated 
	public static View swap(ViewAnimator flipper, View view, Animation in, Animation out) {
		flipper.setInAnimation(in);
		flipper.setOutAnimation(out);
		 
		View returned = null;
		 
		if (flipper.getChildCount() == 2) {
			returned = flipper.getChildAt(0);
			flipper.removeViewAt(0);
		} 
		 
		flipper.addView(view);
		flipper.showNext();
		 
		return returned;
	} 
	 
	@Deprecated 
	public static View swap(ViewAnimator flipper, View view, int in, int out) {
		return swap(flipper, view,
				AnimationUtils.loadAnimation(flipper.getContext(), in),
				AnimationUtils.loadAnimation(flipper.getContext(), out));
		 
	} 
	 
	private static final int DONT_CHANGE_PADDING = 91281239;