In my application I have a fragment where the user enters a password. This fragment is able to rotate. On rotate I want most of the text fields to be saved and restored using
public override void OnSaveInstanceState(Bundle savedInstanceState)
public override void OnActivityCreated(Bundle savedInstanceState)
if (savedInstanceState != null)
_passEditText.Text = savedInstanceState.GetString("passEditText", "");
Fragments have a
Save the current instance state of the given Fragment. This can be used later when creating a new instance of the Fragment and adding it to the fragment manager, to have it create itself to match the current state returned here.
It is as secure, or insecure, as any object in memory, including the
EditText that has the partial/full password within it. Do not serialize the bundle contents to disk or place secure info with a
PersistableBundle as save it...