setPreferenceDataStore

Sets a PreferenceDataStore to be used by this preference instead of using SharedPreferences.

The data store will remain assigned even if the preference is moved around the preference hierarchy. It will also override a data store propagated from the PreferenceManager that owns this preference.

Parameters

dataStore

The PreferenceDataStore to be used by this preference

See also