I am using Sweet Alert for a popup on my product view in an E-commerce Application with two buttons: one for going on cart View and another for reloading the vi
I had the same problem and here's how I solved it: setCanceledOnTouchOutside(false)
var dialog = SweetAlertDialog(context, SweetAlertDialog.ERROR_TYPE);
dialog.setTitleText(getString(R.string.session_expired));
dialog.setConfirmClickListener { sDialog ->
sDialog.dismissWithAnimation()
Utils.signOut(context!!)
Handler().postDelayed({
startActivity(getLoginIntent(context!!))
AcTrans.Builder(context!!).performFade()
}, 500)};
dialog.setCanceledOnTouchOutside(false);
dialog.show();