I have a class called Question which contains a String array of tags. I'm trying to show every question in a Recyclerview using Kotlin and every tag in a new chip. These chips will be included inside a ChipGroup.
My question is:
How can I add every tag element of the array into a new Chip? I'm trying to do this but It's obviously not working.
if (tags != null) {
for (tag in tags) {
val chip = Chip(itemView.context)
}
}