# PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback

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

*** ** * ** ***


```
public interface PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback
```

<br />

Known direct subclasses [LeanbackSettingsFragmentCompat](https://developer.android.com/reference/androidx/leanback/preference/LeanbackSettingsFragmentCompat)

|---|---|
| `https://developer.android.com/reference/androidx/leanback/preference/LeanbackSettingsFragmentCompat` | This fragment provides a container for displaying a `https://developer.android.com/reference/androidx/leanback/preference/LeanbackPreferenceFragmentCompat` |

*** ** * ** ***

Interface that the fragment's containing activity should implement to be able to process preference items that wish to display a dialog.

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback#onPreferenceDisplayDialog(androidx.preference.PreferenceFragmentCompat,androidx.preference.Preference)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat caller, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/Preference pref )` |

## Public methods

### onPreferenceDisplayDialog

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

```
abstract boolean onPreferenceDisplayDialog(
    @NonNull PreferenceFragmentCompat caller,
    @NonNull Preference pref
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat caller` | The fragment containing the preference requesting the dialog |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/Preference pref` | The preference requesting the dialog |

| Returns |
|---|---|
| `boolean` | `true` if the dialog creation has been handled |