android.app
public
static
class
android.app.AlertDialog.Builder
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
AlertDialog.Builder(Context context)
Constructor using a context for this builder and the
AlertDialog it creates.
Public Methods
Creates a
AlertDialog with the arguments supplied to this builder. It does not
show() the dialog. This allows the user to do any extra processing
before displaying the dialog. Use
show() if you don't have any other processing
to do and want this to be created and displayed.
public
Builder
setCancelable(boolean cancelable)
Sets whether the dialog is cancelable or not default is true.
Set the
Drawable to be used in the title.
public
Builder
setIcon(int iconId)
Set the resource id of the
Drawable to be used in the title.
Set a list of items to be displayed in the dialog as the content, you will be notified of the
selected item via the supplied listener. This should be an array type i.e. R.array.foo
public
Builder
setMessage(int messageId)
Set the message to display using the given resource id.
Set the message to display.
Set a listener to be invoked when the negative button of the dialog is pressed.
public
Builder
setNegativeButton(int textId, OnClickListener listener)
Set a listener to be invoked when the negative button of the dialog is pressed.
public
Builder
setNeutralButton(int textId, OnClickListener listener)
Set a listener to be invoked when the neutral button of the dialog is pressed.
Set a listener to be invoked when the neutral button of the dialog is pressed.
Sets the callback that will be called if the dialog is canceled.
Set a listener to be invoked when the positive button of the dialog is pressed.
public
Builder
setPositiveButton(int textId, OnClickListener listener)
Set a listener to be invoked when the positive button of the dialog is pressed.
Set the title displayed in the
Dialog.
public
Builder
setTitle(int titleId)
Set the title using the given resource id.
Creates a
AlertDialog with the arguments supplied to this builder and
show()'s the dialog.