Code example for ArrayList

Methods: clear

0
    private static final ArrayList<Dialog> shownDialogs = new ArrayList<Dialog>();
    private boolean isCancelableOnTouchOutside;
 
    public static void reset() { 
        setLatestDialog(null); 
        shownDialogs.clear();
    } 
 
    public static Dialog getLatestDialog() {
        ShadowDialog dialog = Robolectric.getShadowApplication().getLatestDialog();
        return dialog == null ? null : dialog.realDialog;
    } 
 
    public static void setLatestDialog(ShadowDialog latestDialog) {
        ShadowApplication shadowApplication = Robolectric.getShadowApplication();
        if (shadowApplication != null) shadowApplication.setLatestDialog(latestDialog);
    } 
 
    public void __constructor__(Context context) {
        __constructor__(context, -1);
    }