SavedStateRegistry.SavedStateRestorer


public fun interface SavedStateRegistry.SavedStateRestorer


Restores state for a component.

Implement this interface on a SavedStateProvider registered via registerSavedStateProvider to receive restored state automatically.

The registry will invoke restoreState during the restoration phase or immediately upon registration if the state is already restored.

Summary

Public methods

abstract void
restoreState(Bundle savedState)

Called to restore the state of a component.

Public methods

restoreState

Added in 1.6.0-alpha03
abstract void restoreState(Bundle savedState)

Called to restore the state of a component.

Parameters
Bundle savedState

The SavedState containing the previously saved state, or null if no state was previously saved for this component.