I search a lot on internet but couldn\'t find the exact solution. Here is the link that i last tried from SO. Get selected Chips from a ChipGroup
I want to get selec
the solution I used in Kotlin with data binding
mBinding?.chipGroup?.children
?.toList()
?.filter { (it as Chip).isChecked }
?.forEach { //here are your selected chips as 'it' }
And here is how I got just titles
mBinding?.chipGroup?.children
?.toList()
?.filter { (it as Chip).isChecked }
?.joinToString(", ") { (it as Chip).text }