public static class AlertDialogWrapper.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
AlertDialogWrapper.Builder |
alwaysCallMultiChoiceCallback() |
AlertDialogWrapper.Builder |
alwaysCallSingleChoiceCallback() |
AlertDialogWrapper.Builder |
autoDismiss(boolean dismiss) |
android.app.Dialog |
create() |
AlertDialogWrapper.Builder |
setAdapter(android.widget.ListAdapter adapter)
Deprecated.
|
AlertDialogWrapper.Builder |
setAdapter(android.widget.ListAdapter adapter,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setCancelable(boolean cancelable) |
AlertDialogWrapper.Builder |
setIcon(android.graphics.drawable.Drawable icon) |
AlertDialogWrapper.Builder |
setIcon(int iconId) |
AlertDialogWrapper.Builder |
setIconAttribute(int attrId) |
AlertDialogWrapper.Builder |
setItems(java.lang.CharSequence[] items,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setItems(int itemsId,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setMessage(java.lang.CharSequence message) |
AlertDialogWrapper.Builder |
setMessage(int messageId) |
AlertDialogWrapper.Builder |
setMultiChoiceItems(int itemsId,
boolean[] checkedItems,
android.content.DialogInterface.OnMultiChoiceClickListener listener)
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.
|
AlertDialogWrapper.Builder |
setMultiChoiceItems(java.lang.String[] items,
boolean[] checkedItems,
android.content.DialogInterface.OnMultiChoiceClickListener listener)
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.
|
AlertDialogWrapper.Builder |
setNegativeButton(java.lang.CharSequence text,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setNegativeButton(int textId,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setNeutralButton(java.lang.CharSequence text,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setNeutralButton(int textId,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setOnCancelListener(android.content.DialogInterface.OnCancelListener listener) |
AlertDialogWrapper.Builder |
setOnDismissListener(android.content.DialogInterface.OnDismissListener listener) |
AlertDialogWrapper.Builder |
setOnKeyListener(android.content.DialogInterface.OnKeyListener listener) |
AlertDialogWrapper.Builder |
setOnShowListener(android.content.DialogInterface.OnShowListener listener) |
AlertDialogWrapper.Builder |
setPositiveButton(java.lang.CharSequence text,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setPositiveButton(int textId,
android.content.DialogInterface.OnClickListener listener) |
AlertDialogWrapper.Builder |
setSingleChoiceItems(int itemsId,
int checkedItem,
android.content.DialogInterface.OnClickListener listener)
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.
|
AlertDialogWrapper.Builder |
setSingleChoiceItems(java.lang.String[] items,
int checkedItem,
android.content.DialogInterface.OnClickListener listener)
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.
|
AlertDialogWrapper.Builder |
setTitle(java.lang.CharSequence title) |
AlertDialogWrapper.Builder |
setTitle(int titleId) |
AlertDialogWrapper.Builder |
setView(android.view.View view) |
android.app.Dialog |
show() |
public AlertDialogWrapper.Builder autoDismiss(boolean dismiss)
public AlertDialogWrapper.Builder setMessage(int messageId)
public AlertDialogWrapper.Builder setMessage(java.lang.CharSequence message)
public AlertDialogWrapper.Builder setTitle(int titleId)
public AlertDialogWrapper.Builder setTitle(java.lang.CharSequence title)
public AlertDialogWrapper.Builder setIcon(int iconId)
public AlertDialogWrapper.Builder setIcon(android.graphics.drawable.Drawable icon)
public AlertDialogWrapper.Builder setIconAttribute(int attrId)
public AlertDialogWrapper.Builder setNegativeButton(int textId, android.content.DialogInterface.OnClickListener listener)
public AlertDialogWrapper.Builder setNegativeButton(java.lang.CharSequence text, android.content.DialogInterface.OnClickListener listener)
public AlertDialogWrapper.Builder setPositiveButton(int textId, android.content.DialogInterface.OnClickListener listener)
public AlertDialogWrapper.Builder setPositiveButton(java.lang.CharSequence text, android.content.DialogInterface.OnClickListener listener)
public AlertDialogWrapper.Builder setNeutralButton(int textId, android.content.DialogInterface.OnClickListener listener)
public AlertDialogWrapper.Builder setNeutralButton(java.lang.CharSequence text, android.content.DialogInterface.OnClickListener listener)
public AlertDialogWrapper.Builder setCancelable(boolean cancelable)
public AlertDialogWrapper.Builder setItems(int itemsId, android.content.DialogInterface.OnClickListener listener)
public AlertDialogWrapper.Builder setItems(java.lang.CharSequence[] items, android.content.DialogInterface.OnClickListener listener)
@Deprecated public AlertDialogWrapper.Builder setAdapter(android.widget.ListAdapter adapter)
setAdapter(ListAdapter, DialogInterface.OnClickListener) instead.adapter - The adapter to set.public AlertDialogWrapper.Builder setAdapter(android.widget.ListAdapter adapter, android.content.DialogInterface.OnClickListener listener)
adapter - The adapter to set.listener - The listener called when list items are clicked.public android.app.Dialog create()
public android.app.Dialog show()
public AlertDialogWrapper.Builder setView(android.view.View view)
public AlertDialogWrapper.Builder setMultiChoiceItems(int itemsId, boolean[] checkedItems, android.content.DialogInterface.OnMultiChoiceClickListener listener)
itemsId - A resource ID for the items (e.g. R.array.my_items)checkedItems - specifies which items are checked. It should be null in which case no items are checked. If non null it must be exactly the same length as the array of items.listener - notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. * @returnpublic AlertDialogWrapper.Builder setMultiChoiceItems(java.lang.String[] items, boolean[] checkedItems, android.content.DialogInterface.OnMultiChoiceClickListener listener)
items - the text of the items to be displayed in the list.checkedItems - specifies which items are checked. It should be null in which case no items are checked. If non null it must be exactly the same length as the array of items.listener - notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. * @returnpublic AlertDialogWrapper.Builder alwaysCallSingleChoiceCallback()
public AlertDialogWrapper.Builder alwaysCallMultiChoiceCallback()
public AlertDialogWrapper.Builder setSingleChoiceItems(java.lang.String[] items, int checkedItem, android.content.DialogInterface.OnClickListener listener)
items - the items to be displayed.checkedItem - specifies which item is checked. If -1 no items are checked.listener - notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog.public AlertDialogWrapper.Builder setSingleChoiceItems(int itemsId, int checkedItem, android.content.DialogInterface.OnClickListener listener)
itemsId - the resource id of an array i.e. R.array.foocheckedItem - specifies which item is checked. If -1 no items are checked.listener - notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog.public AlertDialogWrapper.Builder setOnCancelListener(android.content.DialogInterface.OnCancelListener listener)
public AlertDialogWrapper.Builder setOnDismissListener(android.content.DialogInterface.OnDismissListener listener)
public AlertDialogWrapper.Builder setOnShowListener(android.content.DialogInterface.OnShowListener listener)
public AlertDialogWrapper.Builder setOnKeyListener(android.content.DialogInterface.OnKeyListener listener)