onCreatePreferences

abstract fun onCreatePreferences(@Nullable savedInstanceState: Bundle, @Nullable rootKey: String)(source)

Called during onCreate to supply the preferences for this fragment. Subclasses are expected to call setPreferenceScreen either directly or via helper methods such as addPreferencesFromResource.

Parameters

savedInstanceState

If the fragment is being re-created from a previous saved state, this is the state.

rootKey

If non-null, this preference fragment should be rooted at the PreferenceScreen with this key.