Hey guys, does anyone know if it's possible to lon...
# compose-android
h
Hey guys, does anyone know if it's possible to long press at two LazyList items simulationsly and select them and all those between them Let's say we have 6 items, I long press on 1 and 4, that means 1,2,3,4 need to be selected
c
h
I know that, but that is a dragging implementation which is not the same as my use case, my use case is just two clicks at the same time on different positions in the list and selecting everything in between
a
How you achieve this isn't really Compose-specific, but you could save index on long press (
combinedClickable
), and based on bounds, select everything else in between. Item selection state can depend on these saved indices (e.g.
if (index in <range>)
)
c
Right I did not mean this is specific to your use case. You can use it for inspiration though.
h
@ascii even if those two items are clicked at the same time?
a
I don't see why that would change anything. What have you tried so far?
☝️ 1
👍 1