I am working on an android project with many activities and classes.
In few of the Layouts, I have a facility in which a user can select mark all so that all the checkboxes get selected.
But, the issue I am facing is I know only the one way (which is too lengthy) to do this - By creating a markall layout for each of those existing layouts, pasting the original layout code in the markall layout code and then giving all checkboxes as checked. This requires me to create xmls for all unmarkings also for each layout.
Please tell me a way in which I can create one xml for markall which has all checked checkboxes, and then call that layout on top of original layout when mark all is clicked.
Lets assume you have following Layout
get your checkBoxLayout like this inside Activity
Iterate over the childs inside the container like this: