I'm fairly new to Kotlin, and I'm using Anko DSL (with some XML) to generate an alert. My issue is, the onClick{ ... } function doesn't happen when I click the button. Everything else works fine, it's just this one issue
fab.setOnClickListener { view ->
alert {
title = "Add Board"
customView {
include<View>(R.layout.alert_xml) {
this.spinner.adapter = adapter
info("Alert loaded")
val boardSpinner = this.spinner
val boardText = this.board_text
positiveButton("OK") {
onClick {
info("Testing")
}
}
}
}
}.show()
}