i have a lots of child buttons in a toggle group. And i want that whenever one of the child is clicked, make the whole toggle group not clickable.
You can use the OnButtonCheckedListener()
listener:
materialButtonToggleGroup.addOnButtonCheckedListener { group, checkedId, isChecked ->
for (i in 0 until materialButtonToggleGroup.childCount) {
materialButtonToggleGroup.getChildAt(i).isClickable = false
}
}