In the app I\'ve been working on, I would like to have a multiple-state (in my case, three) toggle button, instead of the two that ToggleButton provides. I\'ve
ToggleButton
Chip is a very good native option.
binding.chipGroup.setOnCheckedChangeListener { chipGroup, i -> when (i) { binding.firstChip -> { binding.firstChip.setChipBackgroundColorResource(R.color.colorAccent) } else -> {} } } binding.firstChip.isChecked = true //default
GL
Source