onSetInitialValue

protected open fun onSetInitialValue(restorePersistedValue: Boolean, defaultValue: Any)

called when the preferences are created.

Parameters

restorePersistedValue

True to restore the persisted value; false to use the given defaultValue.

defaultValue

The default value for this Preference. Only use this if restorePersistedValue is false.