PreferenceDialogFragment
abstract class PreferenceDialogFragment : DialogFragment, DialogInterface.OnClickListener
| kotlin.Any | |||
| ↳ | android.app.Fragment | ||
| ↳ | android.app.DialogFragment | ||
| ↳ | androidx.preference.PreferenceDialogFragment |
EditTextPreferenceDialogFragment |
This class is deprecated. Use |
ListPreferenceDialogFragment |
This class is deprecated. Use |
MultiSelectListPreferenceDialogFragment |
This class is deprecated. Use |
Abstract base class which presents a dialog associated with a DialogPreference. Since the preference object may not be available during fragment re-creation, the necessary information for displaying the dialog is read once during the initial call to onCreate and saved/restored in the saved instance state. Custom subclasses should also follow this pattern.
Summary
Constants |
|
|---|---|
const String! |
ARG_KEY = "key"This property is deprecated. Use |
Public constructors |
|---|
|
This function is deprecated. Use |
Public functions |
|
|---|---|
DialogPreference! |
This function is deprecated. Use |
Unit |
This function is deprecated. Use |
Unit |
This function is deprecated. |
Dialog |
This function is deprecated. |
abstract Unit |
This function is deprecated. Use |
Unit |
This function is deprecated. |
Unit |
This function is deprecated. |
Protected functions |
|
|---|---|
Unit |
This function is deprecated. Use |
View? |
This function is deprecated. Use |
Unit |
This function is deprecated. Use |
Inherited Constants |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||
|
Inherited functions |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public constructors
Public functions
fungetPreference(): DialogPreference!
Get the preference that requested this dialog. Available after onCreate has been called on the PreferenceFragment which launched this dialog.
| Returns | |
|---|---|
DialogPreference! |
The |
Protected functions
protected funonBindDialogView(view: View): Unit
Binds views in the content view of the dialog to data.
Make sure to call through to the superclass implementation.
| Parameters | |
|---|---|
view: View |
The content view of the dialog, if it is custom |
protected funonCreateDialogView(context: Context): View?
Creates the content view for the dialog (if a custom content view is required). By default, it inflates the dialog layout resource if it is set.
| Returns | |
|---|---|
View? |
The content view for the dialog |
| See also | |
|---|---|
setLayoutResource |
protected funonPrepareDialogBuilder(builder: AlertDialog.Builder): Unit
Prepares the dialog builder to be shown when the preference is clicked. Use this to set custom properties on the dialog.