I want to create a parent-child relationship for Checkbox in Android as per the material design guidelines given in https://material.io/components/selection-controls#checkboxes.
I want a parent Checkbox under which there will be child checkboxes and When the parent checkbox is checked, all child checkboxes are checked.
If a parent checkbox is unchecked, all child checkboxes are unchecked.
If some, but not all, child checkboxes are checked, the parent checkbox becomes an indeterminate checkbox.
I checked developer docs https://developer.android.com/guide/topics/ui/controls/checkbox but there is no information about this.
Also, I checked material design docs https://material.io/develop/android/components/checkbox/, they have given the guideline to do the same, however, they haven't given any example project to do the same.
I tried creating a Parent-Child relationship with the checkbox using nesting but that didn't work. Does anyone have an idea about how to implement this?