Android.App.FragmentManager.SaveFragmentInstanceState Method
Save the current instance state of the given Fragment.

Syntax

[Android.Runtime.Register("saveFragmentInstanceState", "(Landroid/app/Fragment;)Landroid/app/Fragment$SavedState;", "GetSaveFragmentInstanceState_Landroid_app_Fragment_Handler")]
public abstract Fragment.SavedState SaveFragmentInstanceState (Fragment f)

Parameters

f
The Fragment whose state is to be saved.

Returns

Documentation for this section has not yet been entered.

Remarks

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. Note that there are limits on how this can be used:

  • The Fragment must currently be attached to the FragmentManager.
  • A new Fragment created using this saved state must be the same class type as the Fragment it was created from.
  • The saved state can not contain dependencies on other fragments -- that is it can't use FragmentManager.PutFragment(Android.OS.Bundle, System.String, System.String) to store a fragment reference because that reference may not be valid when this saved state is later used. Likewise the Fragment's target and result code are not included in this state.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 13