@Implements(value=android.app.AlertDialog.class) public class ShadowAlertDialog extends ShadowDialog
| Modifier and Type | Class and Description |
|---|---|
static class |
ShadowAlertDialog.ShadowBuilder |
title| Constructor and Description |
|---|
ShadowAlertDialog() |
| Modifier and Type | Method and Description |
|---|---|
void |
clickOnItem(int index)
Simulates a click on the
Dialog item indicated by index. |
Adapter |
getAdapter() |
View |
getCustomTitleView() |
FrameLayout |
getCustomView() |
int |
getIconId() |
CharSequence[] |
getItems() |
static AlertDialog |
getLatestAlertDialog() |
CharSequence |
getMessage() |
CharSequence |
getTitle() |
View |
getView() |
static void |
reset()
Resets the tracking of the most recently created
AlertDialog |
void |
show() |
callOnCreate, clickOn, clickOnText, clickOnText, dismiss, getLatestDialog, getOnCancelListener, getShownDialogs, hasBeenDismissed, isCancelable, isCancelableOnTouchOutside, setCanceledOnTouchOutside, setLatestDialog, setOnCancelListenerpublic static AlertDialog getLatestAlertDialog()
AlertDialog, or null if none has been created during this test runpublic FrameLayout getCustomView()
public static void reset()
Resets the tracking of the most recently created AlertDialog
public void clickOnItem(int index)
Simulates a click on the Dialog item indicated by index. Handles both multi- and single-choice dialogs, tracks which items are currently checked and calls listeners appropriately.
index - the index of the item to click onpublic CharSequence getTitle()
getTitle in class ShadowDialogpublic CharSequence[] getItems()
public Adapter getAdapter()
public CharSequence getMessage()
public void show()
show in class ShadowDialogpublic View getView()
AlertDialog.Builder#setView(View)public int getIconId()
AlertDialog.Builder#setIcon(int)public View getCustomTitleView()
AlertDialog.Builder#setCustomTitle(View)