Android: onSaveInstanceState in Back button
问题 I am developing an application in which i am overriding the back button. I created a check box. On click of which i am calling intent for: startActivityforResult(); And also maintaining the state of activity as : @Override public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); savedInstanceState.putBoolean("checkbox", checkbox.isChecked()); } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super