Code example for FragmentActivity

Methods: onSaveInstanceState

0
    } 
  } 
 
  @Override 
  protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
     
    outState.putStringArrayList(KEY_MIDDLE_CONTENTS, middleContents);
  } 
   
  @Override 
  protected void onRestoreInstanceState(Bundle inState) {
    middleContents=inState.getStringArrayList(KEY_MIDDLE_CONTENTS);
  } 
 
  void onListItemClick(SimpleListFragment fragment, int position) {
    if (fragment == middleFragment) {
      ((Button)root.getRightView()).setText(middleContents.get(position));
       
      if (isLeftShowing) {
        root.hideLeft();