You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In some cases, I want to be able to let the user press the Chip, but not to let it be toggled of being checked/unchecked due to it.
I want to decide when to have it be checked, and by which event (which might not be clicking on it, for example).
Describe the solution you'd like
Maybe have function "setCheckableByUser", and so in this case I would pass "false" to it.
Describe alternatives you've considered
I tried to use this:
chip.isCheckable=false
chip.isChecked = true
But it didn't let me check the chip.
And, using setOnClickListener when isCheckable is true means that the value I get is the new one, after it was toggled.
It could also be nice to be able to set a chip as checked/unchecked without triggering the setOnCheckedChangeListener.
Currently in order to do it, I will probably have to extend Chip and have the same thing I had to do here: https://stackoverflow.com/a/27391245/878126
Is your feature request related to a problem? Please describe.
In some cases, I want to be able to let the user press the Chip, but not to let it be toggled of being checked/unchecked due to it.
I want to decide when to have it be checked, and by which event (which might not be clicking on it, for example).
Describe the solution you'd like
Maybe have function "setCheckableByUser", and so in this case I would pass "false" to it.
Describe alternatives you've considered
I tried to use this:
But it didn't let me check the chip.
And, using setOnClickListener when isCheckable is true means that the value I get is the new one, after it was toggled.
It could also be nice to be able to set a chip as checked/unchecked without triggering the setOnCheckedChangeListener.
Currently in order to do it, I will probably have to extend Chip and have the same thing I had to do here:
https://stackoverflow.com/a/27391245/878126
Additional context
https://developer.android.com/reference/com/google/android/material/chip/Chip
The text was updated successfully, but these errors were encountered: