Does anyone know how I can close an Anko alert, but using a "button" which is embedded in a customView, AND, where isCancelable has been set = false ?
Here is the Kotlin code for this alert (I've left out a bunch of styles for clarity):
myAlert = alert {
customView {
verticalLayout {
..image, textView etc. r here..
..
button("OK") {
onClick {
//**HOW CAN I CLOSE THIS ALERT FROM HERE??
}
}
}
}
myAlert.isCancelable = false
myAlert.show()
I noticed that the "onClick" callback above is of type "CoroutineScope" which made no sense to me.
What DOES work, is the following. However I've no idea how to style the "okButton" (width, colors etc). If that is possible please let me know as it might be simpler.
Does anyone know how I can close an Anko alert, but using a "button" which is embedded in a customView, AND, where isCancelable has been set = false ?
Here is the Kotlin code for this alert (I've left out a bunch of styles for clarity):
I noticed that the "onClick" callback above is of type "CoroutineScope" which made no sense to me.
What DOES work, is the following. However I've no idea how to style the "okButton" (width, colors etc). If that is possible please let me know as it might be simpler.