well I want to disable all children of the parent ...
# android
o
well I want to disable all children of the parent layout when an event occurs, so I do this
Copy code
fun toggleLayoutChildren(layout: RelativeLayout, toggle: Boolean) {
    (0..layout.childCount)
        .filter { layout.getChildAt(it).id != R.id.spinKitLoader }
        .forEach { layout.getChildAt(it).isEnabled = toggle }
}