1ChipGroup chipGroup = new ChipGroup(parentView.getContext());
2
3String[] genres = {"Thriller", "Comedy", "Adventure"};
4for(String genre : genres) {
5 Chip chip = new Chip(parentView.getContext());
6 chip.setText(genre);
7 chipGroup.addView(chip);
8}
9
10