Hello! How can i handle long press on Checkbox along with default click behavior?
s
Stefan Oltmann
04/10/2024, 11:40 AM
Out of curiosity: Why would you want to long press on a checkbox?
p
PHondogo
04/10/2024, 11:43 AM
I have a list of items with their selection. By long press I want to start range selection where first long press mark current item as start and another click event on other item will mark the end of range.
s
Stefan Oltmann
04/10/2024, 11:45 AM
Oh, I see. So you have a list of checkboxes.
I would add a listener to the Item (Box) the checkbox is in and go from there.
Stefan Oltmann
04/10/2024, 11:46 AM
Modifier.combinedClickable
is what you are looking for.
p
PHondogo
04/10/2024, 11:50 AM
I've made with combined. But on mouse over now square area appeares instead of rounded. I want to keep native checkbox visual effects.