add chips dynamically android search code example
Example: how to add chips dynamically android
ChipGroup chipGroup = new ChipGroup(parentView.getContext());
String[] genres = {"Thriller", "Comedy", "Adventure"};
for(String genre : genres) {
Chip chip = new Chip(parentView.getContext());
chip.setText(genre);
chipGroup.addView(chip);
}