ColorDialog icon indicating copy to clipboard operation
ColorDialog copied to clipboard

how to set cancelable false?

Open AmrutGhatage opened this issue 6 years ago • 2 comments

    new PromptDialog(this)
            .setDialogType(PromptDialog.DIALOG_TYPE_WARNING)
            .setCancelable(false)
            .setTitleText("Alert") //  Shows error ...why?
            .setContentText("Are you there")
            .setPositiveListener("YES", new PromptDialog.OnPositiveListener()
            {
                @Override
                public void onClick(PromptDialog dialog) {
                    dialog.dismiss();
                }
            }).show();

AmrutGhatage avatar Feb 16 '18 11:02 AmrutGhatage

Did this ever get answered? I need to add a cancel button to the standard prompt

justdan0227 avatar Apr 03 '18 18:04 justdan0227

    new PromptDialog(this)
            .setDialogType(PromptDialog.DIALOG_TYPE_WARNING)
            .setCancelable(false)
            .setTitleText("Alert") //  Shows error ...why?
            .setContentText("Are you there")
            .setPositiveListener("YES", new PromptDialog.OnPositiveListener()
            {
                @Override
                public void onClick(PromptDialog dialog) {
                    dialog.dismiss();
                }
            }).show();

maybe u can : PromptDialog dialog = new PromptDialog(this) .setDialogType(PromptDialog.DIALOG_TYPE_SUCCESS) .setAnimationEnable(true) .setTitleText(getString(R.string.success)) .setContentText(getString(R.string.text_data)) .setPositiveListener(getString(R.string.ok), new PromptDialog.OnPositiveListener() { @Override public void onClick(PromptDialog dialog) { dialog.dismiss(); } }); dialog.setCancelable(true); dialog.show();

vbigbang avatar Apr 09 '19 06:04 vbigbang