Code example for ViewPager.SimpleOnPageChangeListener

0
        public boolean isViewFromObject(View arg0, Object arg1) {        	    
            return arg0 == ((View) arg1);
        } 
    } 
     
    private class PageListener extends SimpleOnPageChangeListener{ 
        public void onPageSelected(int position) {
            selectedOpt.setText("You have selected the page number "+position);
        } 
    } 
 
     
}