Kindly This is my code below, and I am pasting the error messages underneath:
I am trying to use setOnItemClickListener on the spinner, is it permissible?
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>, view: View, position: Int, id: Long) {
print("onItemSelected position = $position id = $id")
}
override fun onNothingSelected(parent: AdapterView<*>) {
}
}
I wrote it because inline creating object from the interface is different.