Code example for ViewPager.SimpleOnPageChangeListener

import com.viewpagerindicator.TitlePageIndicator; 
public class MultiListUi extends FragmentActivity { 
	//class to cache the currently-shown page of the ViewPager 
	private static class CurrentPageListener extends SimpleOnPageChangeListener { 
		public static String CURRENT_PAGE = "com.creationline.cloudstack.ui.CurrentPageListener.CURRENT_PAGE";
		private static int currentPage;
		public static int getCurrentPage() { 
			return currentPage;
		public void onPageSelected(int page) {
			currentPage = page;
    /** Called when the activity is first created. */