onSaveInstanceState

abstract fun onSaveInstanceState(bundle: Bundle)

Callback which should be called when the parent lifecycle aware component saves its instance state. Note the bundle which must be handled explicitly during saving.

Sample usage in Android Fragment:

override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
mapView.onSaveInstanceState(outState)
}

Parameters

bundle

Bundle containing some internal data used for the lifecycle aware component state recreation.