Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onRestoreInstanceState(Bundle savedInstanceState) {
- textView.setText(savedInstanceState.getString(TEXT_VIEW_KEY));
- }
- // invoked when the activity may be temporarily destroyed, save the instance state here
- @Override
- public void onSaveInstanceState(Bundle outState) {
- outState.putString(GAME_STATE_KEY, gameState);
- outState.putString(TEXT_VIEW_KEY, textView.getText());
- // call superclass to save any view hierarchy
- super.onSaveInstanceState(outState);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement