added in version 24.1.0
belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1

PreferenceDialogFragment

public abstract class PreferenceDialogFragment
extends DialogFragment implements DialogInterface.OnClickListener

java.lang.Object
   ↳ android.app.Fragment
     ↳ android.app.DialogFragment
       ↳ android.support.v14.preference.PreferenceDialogFragment
Known Direct Subclasses


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(Bundle) and saved/restored in the saved instance state. Custom subclasses should also follow this pattern.

Summary

Constants

String ARG_KEY

Inherited constants

From class android.app.DialogFragment
From interface android.content.ComponentCallbacks2

Public constructors

PreferenceDialogFragment()

Public methods

DialogPreference getPreference()

Get the preference that requested this dialog.

void onClick(DialogInterface dialog, int which)
void onCreate(Bundle savedInstanceState)
Dialog onCreateDialog(Bundle savedInstanceState)
abstract void onDialogClosed(boolean positiveResult)
void onDismiss(DialogInterface dialog)
void onSaveInstanceState(Bundle outState)

Protected methods

void onBindDialogView(View view)

Binds views in the content View of the dialog to data.

View onCreateDialogView(Context context)

Creates the content view for the dialog (if a custom content view is required).

void onPrepareDialogBuilder(AlertDialog.Builder builder)

Prepares the dialog builder to be shown when the preference is clicked.

Inherited methods

From class android.app.DialogFragment
From class android.app.Fragment