| static final String STATE_SCORE = "playerScore"; static final
String STATE_LEVEL = "playerLevel"; ...
@Override public void onSaveInstanceState(Bundle
savedInstanceState) { // Save the user's
current game state
savedInstanceState.putInt(STATE_SCORE, mCurrentScore);
savedInstanceState.putInt(STATE_LEVEL,
mCurrentLevel); // Always call the
superclass so it can save the view hierarchy state
super.onSaveInstanceState(savedInstanceState); }
|