damianpetla
09/18/2017, 11:54 AMcancellable
is gone when building alerts?orafaaraujo
09/18/2017, 12:02 PMval pwAlert = activity.alert(Appcompat) {
titleResource = R.string.title
messageResource = R.string.message
okButton { okClick() }
cancelButton { cancelClick() }
}.build()
pwAlert.setCancelable(false)
pwAlert.setCanceledOnTouchOutside(false)
pwAlert.show()
If this was your question...damianpetla
09/18/2017, 12:22 PMalert(Appcompat) {}
but it doesn’t work with alert {}
which returns DialogInterface
on build()
damianpetla
09/18/2017, 12:23 PMdamianpetla
09/18/2017, 12:25 PMshow()
now I have to use this .build().apply { setCancelable(false) }.show()
damianpetla
09/18/2017, 12:27 PMdamianpetla
09/18/2017, 12:41 PM