Class ShadowAlertDialog

    • Constructor Detail

      • ShadowAlertDialog

        public ShadowAlertDialog()
    • Method Detail

      • getLatestAlertDialog

        public static AlertDialog getLatestAlertDialog()
        the most recently created AlertDialog, or null if none has been created during this test run
      • reset

        public static void reset()
        Resets the tracking of the most recently created AlertDialog
      • clickOnItem

        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 on
      • getItems

        public CharSequence[] getItems()
        the items that are available to be clicked on
      • getAdapter

        public Adapter getAdapter()
      • getMessage

        public CharSequence getMessage()
        the message displayed in the dialog