Code example for Bundle

Methods: getInt

0
    } 
  } 
 
  @Override 
  public void onRestoreInstanceState(Bundle state) {
    super.onRestoreInstanceState(state);
     
    pager.setCurrentItem(state.getInt(KEY_POSITION));
  } 
 
  @Override 
  public void onSaveInstanceState(Bundle state) {
    super.onSaveInstanceState(state);
     
    state.putInt(KEY_POSITION, pager.getCurrentItem());
  } 
 
  @Override 
  public void onTabSelected(Tab tab, FragmentTransaction ft) {
    Integer position=(Integer)tab.getTag();