Answers for "how to add chips dynamically android"

0

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);
}
Posted by: Guest on July-28-2020

Code answers related to "how to add chips dynamically android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language