AlertDialog

Class of android.app · AlertDialog.java · Android's reference

public class AlertDialog extends Dialog implements DialogInterface

AlertDialog ← Dialog

A dialog of a title, a message or a view, and up to three buttons, laid out in a column.

Nested types

Extended in the framework by

Constructors

protected AlertDialog(Context context) source
protected AlertDialog(Context context, int themeResId) source
protected AlertDialog(Context context, boolean cancelable, OnCancelListener cancelListener) source

Methods

public void setTitle(CharSequence title) source
public void setMessage(CharSequence message) source
public void setView(View view) source
public void setView(View view, int viewSpacingLeft, int viewSpacingTop, int viewSpacingRight, int viewSpacingBottom) source
public void setButton(int whichButton, CharSequence text, OnClickListener listener) source
public Button getButton(int whichButton) source

The button of BUTTON_POSITIVE, BUTTON_NEGATIVE or BUTTON_NEUTRAL, or null before onCreate or when it has no text.

public void setIcon(int resId) empty body source
public void setIcon(android.graphics.drawable.Drawable icon) empty body source
protected void onCreate(Bundle savedInstanceState) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.