Hi everybody ! Given this `LazyColumn` , how can I...
# compose
l
Hi everybody ! Given this
LazyColumn
, how can I know if an item has been Long-clicked, and its index ?
I found this link, but I'm not sure if it can apply to a long click: https://stackoverflow.com/a/66376654/662618
Because there's
Copy code
InteractionState#collectIsPressedAsState()
but nothing for a long press.
l
Thank you, but how to use this modifier
combineClickable
and
onLongClick
in order to get the selected item ? Because
onLongClick
can't give me that information directly
z
You can specify it as a modifier on each item, e.g. in
FolderItem/FileItem
where you have access to the long clicked item as well.
👍🏾 1
l
Thank you very much 😃 I'll try it.
🙏🏽 1
It worked : thank you very much 🙂
🙌🏽 1