I want to get the coordinates of an item in a lazy column when it is clicked. How can i do that?
s
Stylianos Gakis
09/12/2024, 9:48 AM
Coordinates relative to what? The full screen or the lazyColumn itself? And if you scroll and click again, do you want different coordinates?
p
Pratyush
09/12/2024, 9:51 AM
So i want to mimic a shared element transition when i click on the card. But due to some constraints, i cant use the actual implementation. Rather, i will place another card on top the item that is being clicked and expand that card.
For this, i need the coordinates of the item that is clicked relative to the screen
On it to get some coordinates.
Play around with it, perhaps one of them will be what you are looking for.
You can then store that value in a local mutableState, which you read inside the onClick