https://kotlinlang.org logo
Title
a

Attila Blenesi

08/11/2021, 8:19 AM
Is it possible to make
swipeable
/
draggable
only from a portion of a view?
Keep use case - only the initial section is draggable, rest of item checkbox, text input consumes events.
The internal
draggable
has a parameter
canDrag: (PointerInputChange) -> Boolean
, but the public API implements this by default with
{ true }
.
a

Alex Gabor

08/11/2021, 8:46 AM
Talking about the todo video. You could apply the swipeable modifier only to the drag indicator on the left, then read the offset from the SwipeableState and apply it to the whole row
👍 1
a

Attila Blenesi

08/11/2021, 9:04 AM
Yes this would a simple solution for the first example.