PreferenceScreen

A top-level container that represents a settings screen. This is the root component of your Preference hierarchy. A PreferenceFragmentCompat points to an instance of this class to show the preferences. To instantiate this class, use createPreferenceScreen.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)
Do NOT use this constructor, use createPreferenceScreen.

Functions

Link copied to clipboard
open fun setShouldUseGeneratedIds(shouldUseGeneratedIds: Boolean)
Set whether the adapter created for this screen should attempt to use the preference IDs generated by addPreference as stable item IDs.