Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

SummaryProvider

interface SummaryProvider<T : Preference!>
androidx.preference.Preference.SummaryProvider

Interface definition for a callback to be invoked when the summary of this Preference is requested (typically when this preference is added to the hierarchy or its value is updated). Implement this to allow dynamically configuring a summary.

If a SummaryProvider is set, setSummary(CharSequence) will throw an exception, and any existing value for the summary will not be used. The value returned by the SummaryProvider will be used instead whenever getSummary() is called on this preference.

Simple implementations are provided for EditTextPreference and ListPreference. To enable these implementations, use setSummaryProvider(SummaryProvider) with EditTextPreference.SimpleSummaryProvider#getInstance() or ListPreference.SimpleSummaryProvider#getInstance().

Summary

Public methods
abstract CharSequence!
provideSummary(preference: T)

Called whenever getSummary() is called on this preference.

Public methods

provideSummary

abstract fun provideSummary(preference: T): CharSequence!

Called whenever getSummary() is called on this preference.

Parameters
preference T: This preference
Return
CharSequence! A CharSequence that will be displayed as the summary for this preference