I\'m doing a list with Chips. I want this chips can be selected, so, taking a look to https://material.io/develop/android/components/chip/ I see I can have a \"Choice Chip\"
In order to set the chip style in code you can try the following:
val chip = Chip(context) val drawable = ChipDrawable.createFromAttributes(context, null, 0, R.style.Widget_MaterialComponents_Chip_Choice) chip.setChipDrawable(drawable)