setOncheckedListener kotlin code example
Example: setoncheckedchangelistener kotlin
Use CheckBox.OnCheckedChangeListener like:
checkBox.setOnCheckedChangeListener { buttonView, isChecked ->
Toast.makeText(this,isChecked.toString(),Toast.LENGTH_SHORT).show()
}
where checkBox is CheckBox ID.