how to add chips dynamically android

Solutions on MaxInterview for how to add chips dynamically android by the best coders in the world

showing results for - "how to add chips dynamically android"
María Alejandra
14 Feb 2017
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