Code example for ViewFlipper

Methods: setAutoStartsetFlipIntervalstartFlipping

0
		 
		findViewById(R.id.play).setOnClickListener(new OnClickListener() {
			@Override 
			public void onClick(View view) {
				//sets auto flipping 
				mViewFlipper.setAutoStart(true);
				mViewFlipper.setFlipInterval(4000);
				mViewFlipper.startFlipping();
			} 
		}); 
 
		findViewById(R.id.stop).setOnClickListener(new OnClickListener() {
			@Override 
			public void onClick(View view) {
				//stop auto flipping  
				mViewFlipper.stopFlipping();
			} 
		}); 
		 
		 
		//animation listener