@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. |
android.widget.Adapter |
getAdapter() |
android.view.View |
getCustomTitleView() |
android.widget.FrameLayout |
getCustomView() |
int |
getIconId() |
java.lang.CharSequence[] |
getItems() |
static android.app.AlertDialog |
getLatestAlertDialog() |
java.lang.CharSequence |
getMessage() |
java.lang.CharSequence |
getTitle() |
android.view.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 android.app.AlertDialog getLatestAlertDialog()
AlertDialog, or null if none has been created during this test runpublic android.widget.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 java.lang.CharSequence getTitle()
getTitle in class ShadowDialogpublic java.lang.CharSequence[] getItems()
public android.widget.Adapter getAdapter()
public java.lang.CharSequence getMessage()
public void show()
show in class ShadowDialogpublic android.view.View getView()
AlertDialog.Builder#setView(View)public int getIconId()
AlertDialog.Builder#setIcon(int)public android.view.View getCustomTitleView()
AlertDialog.Builder#setCustomTitle(View)