Google is committed to advancing racial equity for Black communities. See how.

SavedStateProvider

interface SavedStateProvider
androidx.savedstate.SavedStateRegistry.SavedStateProvider

This interface marks a component that contributes to saved state.

Summary

Public methods
abstract Bundle

Called to retrieve a state from a component before being killed so later the state can be received from consumeRestoredStateForKey(String)

Public methods

saveState

@NonNull abstract fun saveState(): Bundle

Called to retrieve a state from a component before being killed so later the state can be received from consumeRestoredStateForKey(String)

Return
Bundle S with your saved state.