I am trying to add chips into ChipGroup(not singleLine):
val chip = Chip(this)
chip.isCloseIconVisible = true
for (i in 0..10) {
chip.setText("Some text $i")
chip_group.addView(chip as View)
}
But I get an exception:
The specified child already has a parent. You must call removeView() on the child's parent first.
How can I mark chip as a unique child? Or what should I do?