Saving data: @Override public void onSaveInstanceState(Bundle outState) { //---save whatever you need to persist— outState.putString("ID", "1234567890"); super.onSaveInstanceState(outState); }
Loading data: @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); //---retrieve the information persisted earlier--- String ID = savedInstanceState.getString("ID"); }
|