Code example for ViewFlipper

Methods: setDisplayedChild, setInAnimation, setOutAnimation

0
		@Override 
		public void onClick(View v) { 
			 
			// TODO Auto-generated method stub 
			if(v.getId()>pre){ 
				mViewFlipperLoc.setInAnimation(AnimationHelper.inFromLeftAnimation()); 
		        mViewFlipperLoc.setOutAnimation(AnimationHelper.outToRightAnimation()); 
			} 
			else 
			{ 
				mViewFlipperLoc.setInAnimation(AnimationHelper.inFromRightAnimation()); 
		    	mViewFlipperLoc.setOutAnimation(AnimationHelper.outToLeftAnimation()); 
			} 
			switch (v.getId()) { 
			case ID_RADIOBTN_GOODS: 
				mViewFlipperLoc.setDisplayedChild(0); 
				break; 
			case ID_RADIOBTN_PUSH: 
				mViewFlipperLoc.setDisplayedChild(1); 
				break; 
			case ID_RADIOBTN_LOCATION: 
				mViewFlipperLoc.setDisplayedChild(2); 
				break; 
			default: 
				break; 
			}