📅  最后修改于: 2022-03-11 14:55:46.027000             🧑  作者: Mango
Use CheckBox.OnCheckedChangeListener like:
checkBox.setOnCheckedChangeListener { buttonView, isChecked ->
Toast.makeText(this,isChecked.toString(),Toast.LENGTH_SHORT).show()
}
where checkBox is CheckBox ID.