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

DialogPreference

public abstract class DialogPreference
extends Preference

java.lang.Object
   ↳ android.support.v7.preference.Preference
     ↳ android.support.v7.preference.DialogPreference
Known Direct Subclasses
Known Indirect Subclasses


A base class for Preference objects that are dialog-based. These preferences will, when clicked, open a dialog showing the actual preference controls.

Summary

Nested classes

interface DialogPreference.TargetFragment

 

Inherited XML attributes

From class android.support.v7.preference.Preference

Inherited constants

From class android.support.v7.preference.Preference

Public constructors

DialogPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
DialogPreference(Context context, AttributeSet attrs, int defStyleAttr)
DialogPreference(Context context, AttributeSet attrs)
DialogPreference(Context context)

Public methods

Drawable getDialogIcon()

Returns the icon to be shown on subsequent dialogs.

int getDialogLayoutResource()

Returns the layout resource that is used as the content View for subsequent dialogs.

CharSequence getDialogMessage()

Returns the message to be shown on subsequent dialogs.

CharSequence getDialogTitle()

Returns the title to be shown on subsequent dialogs.

CharSequence getNegativeButtonText()

Returns the text of the negative button to be shown on subsequent dialogs.

CharSequence getPositiveButtonText()

Returns the text of the positive button to be shown on subsequent dialogs.

void setDialogIcon(int dialogIconRes)

Sets the icon (resource ID) of the dialog.

void setDialogIcon(Drawable dialogIcon)

Sets the icon of the dialog.

void setDialogLayoutResource(int dialogLayoutResId)

Sets the layout resource that is inflated as the View to be shown as the content View of subsequent dialogs.

void setDialogMessage(CharSequence dialogMessage)

Sets the message of the dialog.

void setDialogMessage(int dialogMessageResId)
void setDialogTitle(int dialogTitleResId)
void setDialogTitle(CharSequence dialogTitle)

Sets the title of the dialog.

void setNegativeButtonText(CharSequence negativeButtonText)

Sets the text of the negative button of the dialog.

void setNegativeButtonText(int negativeButtonTextResId)
void setPositiveButtonText(int positiveButtonTextResId)
void setPositiveButtonText(CharSequence positiveButtonText)

Sets the text of the positive button of the dialog.

Protected methods

void onClick()

Processes a click on the preference.

Inherited methods

From class android.support.v7.preference.Preference
From class java.lang.Object