# ListPreference.SimpleSummaryProvider

Artifact: [androidx.preference:preference](https://developer.android.com/jetpack/androidx/releases/preference) [View Source](https://cs.android.com/search?q=file:androidx/preference/ListPreference.java+class:androidx.preference.ListPreference.SimpleSummaryProvider) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/preference#1.1.0)

*** ** * ** ***


```
class ListPreference.SimpleSummaryProvider : Preference.SummaryProvider<ListPreference!>
```

<br />

*** ** * ** ***

A simple `https://developer.android.com/reference/kotlin/androidx/preference/Preference.SummaryProvider` implementation for a `https://developer.android.com/reference/kotlin/androidx/preference/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 functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/preference/ListPreference.SimpleSummaryProvider` | `https://developer.android.com/reference/kotlin/androidx/preference/ListPreference.SimpleSummaryProvider#getInstance()()` Retrieve a singleton instance of this simple `https://developer.android.com/reference/kotlin/androidx/preference/Preference.SummaryProvider` implementation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/preference/ListPreference.SimpleSummaryProvider#provideSummary(androidx.preference.ListPreference)(preference: https://developer.android.com/reference/kotlin/androidx/preference/ListPreference)` Called whenever `https://developer.android.com/reference/kotlin/androidx/preference/Preference#getSummary()` is called on this preference. |

## Public functions

### getInstance

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/preference#1.1.0)

```
java-static fun getInstance(): ListPreference.SimpleSummaryProvider
```

Retrieve a singleton instance of this simple `https://developer.android.com/reference/kotlin/androidx/preference/Preference.SummaryProvider` implementation.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/preference/ListPreference.SimpleSummaryProvider` | a singleton instance of this simple `https://developer.android.com/reference/kotlin/androidx/preference/Preference.SummaryProvider` implementation |

### provideSummary

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/preference#1.1.0)

```
fun provideSummary(preference: ListPreference): CharSequence?
```

Called whenever `https://developer.android.com/reference/kotlin/androidx/preference/Preference#getSummary()` is called on this preference.

| Parameters |
|---|---|
| `preference: https://developer.android.com/reference/kotlin/androidx/preference/ListPreference` | This preference |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | A CharSequence that will be displayed as the summary for this preference |