ListPreference.SimpleSummaryProvider


public final class ListPreference.SimpleSummaryProvider implements Preference.SummaryProvider


A simple androidx.preference.Preference.SummaryProvider implementation for a ListPreference. If no value has been set, the summary displayed will be 'Not set', otherwise the summary displayed will be the entry set for this preference.

Summary

Public methods

static @NonNull ListPreference.SimpleSummaryProvider

Retrieve a singleton instance of this simple androidx.preference.Preference.SummaryProvider implementation.

@Nullable CharSequence

Called whenever getSummary is called on this preference.

Public methods

getInstance

Added in 1.1.0
public static @NonNull ListPreference.SimpleSummaryProvider getInstance()

Retrieve a singleton instance of this simple androidx.preference.Preference.SummaryProvider implementation.

Returns
@NonNull ListPreference.SimpleSummaryProvider

a singleton instance of this simple androidx.preference.Preference.SummaryProvider implementation

provideSummary

Added in 1.1.0
public @Nullable CharSequence provideSummary(@NonNull ListPreference preference)

Called whenever getSummary is called on this preference.

Parameters
@NonNull ListPreference preference

This preference

Returns
@Nullable CharSequence

A CharSequence that will be displayed as the summary for this preference