I want to create 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 Parent Child relationship with checkbox using nesting but that didn't worked. Anyone has idea about how to implement this ?
Aucun commentaire:
Enregistrer un commentaire