setDefaultValue

open fun setDefaultValue(defaultValue: Any)(source)

Sets the default value for this preference, which will be set either if persistence is off or persistence is on and the preference is not found in the persistent storage.

Parameters

defaultValue

The default value