setShouldUseGeneratedIds

open fun setShouldUseGeneratedIds(shouldUseGeneratedIds: Boolean)(source)

Set whether the adapter created for this screen should attempt to use the preference IDs generated by addPreference as stable item IDs. Setting this to false can suppress unwanted animations if Preference objects are frequently removed from and re-added to their containing PreferenceGroup.

This method may only be called when the preference screen is not attached to the hierarchy.

Default value is true.

Parameters

shouldUseGeneratedIds

true if the adapter should use the preference ID as a stable ID, or false to disable the use of stable IDs.