Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. @Override
  2. public void onRestoreInstanceState(Bundle savedInstanceState) {
  3. textView.setText(savedInstanceState.getString(TEXT_VIEW_KEY));
  4. }
  5.  
  6. // invoked when the activity may be temporarily destroyed, save the instance state here
  7. @Override
  8. public void onSaveInstanceState(Bundle outState) {
  9. outState.putString(GAME_STATE_KEY, gameState);
  10. outState.putString(TEXT_VIEW_KEY, textView.getText());
  11.  
  12. // call superclass to save any view hierarchy
  13. super.onSaveInstanceState(outState);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement