I know this question has already been asked a lot, but I don\'t get why onSaveInstanceState isn\'t working for me. It\'s probably something stupid, but I hope some of you ca
you are saving that in the local variable why ? may try this
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
this.ToDo = savedInstanceState.getStringArrayList("MyArrayList");
}
Usually you restore your state in onCreate. It is possible to restore it in onRestoreInstanceState as well, but not very common. (onRestoreInstanceState is called after onStart, whereas onCreate is called before onStart.
from : onSaveInstanceState () and onRestoreInstanceState ()