Issue
I have a question related to material toggle buttons group. How can I check is any of toggle buttons in group selected? If any of buttons in group is selected then button 'Next' will be active, else button 'Next' will be inactive. Should I check each toggle button or there is a way to check group of toggle buttons?
Solution
You can use the method getCheckedButtonIds()
to get all selected buttons.
To check if no buttons are selected you can use:
if (group.checkedButtonIds.isEmpty()){
//...
}
Answered By - Gabriele Mariotti
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.