How do I remove all chips from a ChipGroup?
I know I can remove one chip by passing it to the removeView
method or one chip by it's index by calling the removeViewAt
and passing it's index, but I wanted to remove all views.
You can remove all chips by calling the removeAllViews
method:
val chipGroup = findViewById<ChipGroup>(R.id.chip_group)
chipGroup.removeAllViews()