EditTextPreference.SimpleSummaryProvider


public final class EditTextPreference.SimpleSummaryProvider implements Preference.SummaryProvider


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

Summary

Public methods

static @NonNull EditTextPreference.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 EditTextPreference.SimpleSummaryProvider getInstance()

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

Returns
@NonNull EditTextPreference.SimpleSummaryProvider

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

provideSummary

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

Called whenever getSummary is called on this preference.

Parameters
@NonNull EditTextPreference preference

This preference

Returns
@Nullable CharSequence

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