예제 #1
0
  @Override
  protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    // stick our task into the outState
    outState.putParcelable(TASK_IN_PROGRESS, model);
  }
예제 #2
0
  @Override
  protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    support.onSaveInstanceState(outState);

    // if applicable, store the graph, so that after
    // a orientation change the graph could be restored
    if (getTabHost().getCurrentTabTag().equals("tab_graphs") && lastShowChart_itemid != null) {
      outState.putLong("lastShowChart_itemid", lastShowChart_itemid);
      outState.putString("lastShowChart_units", lastShowChart_units);
      outState.putString("lastShowChart_description", lastShowChart_description);
      outState.putString("lastShowChart_graphText", lastShowChart_graphText);
      outState.putString("prevTabTag", prevTabTag);
    }
    // also for screen tab
    if (getTabHost().getCurrentTabTag().equals("tab_screens") && lastShowScreen_screen__id != -1) {
      outState.putLong("lastShowScreen_screenid", lastShowScreen_screen__id);
    }
  }