Code example for ViewFlipper

Methods: getDisplayedChildremoveAllViews

0
		 * finish(); 
		 */ 
	} 
 
	public void onExit() { 
		page.removeAllViews();
		Intent i = new Intent(WelcomeScreen.this, MainActivity.class);
		i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		startActivity(i);
		finish();
	} 
 
	private void updateArrows(int displayedChild) {
		if (displayedChild == 0) {
			mSwipeLeft.setVisibility(View.VISIBLE);
			mSwipeRight.setVisibility(View.INVISIBLE);
		} else if (displayedChild == 6) {
			mSwipeLeft.setVisibility(View.INVISIBLE);
			mSwipeRight.setVisibility(View.VISIBLE);
		} else { 
			mSwipeLeft.setVisibility(View.VISIBLE);
			mSwipeRight.setVisibility(View.VISIBLE);
		} 
	} 
 
	private void SwipeRight() { 
		if (page.getDisplayedChild() != 0) {
			mSwipeLeft.setVisibility(View.INVISIBLE);
			mSwipeRight.setVisibility(View.INVISIBLE);
 
			page.setInAnimation(animFlipInBackward);
			page.setOutAnimation(animFlipOutBackward);
			page.showPrevious();
			updateArrows(page.getDisplayedChild());
		} 
	} 
 
	private void SwipeLeft() { 
		if (page.getDisplayedChild() != 6) {
			mSwipeLeft.setVisibility(View.INVISIBLE);
			mSwipeRight.setVisibility(View.INVISIBLE);
 
			page.setInAnimation(animFlipInForeward);
			page.setOutAnimation(animFlipOutForeward);
			page.showNext();
			updateArrows(page.getDisplayedChild());
		} else { 
			onExit(); 
		} 
	} 
 
Connect your IDE to all the code out there  Get Codota for Java