Hi - I'm working on integrating a Compose componen...
# compose
m
Hi - I'm working on integrating a Compose component into a View-based screen - specifically within a
RecyclerView
. The Compose component loads several images internally, and I need to know (at a given moment in time) which of the images is 100% visible on screen. In the imperative, View-based world, we query for each image view's percent visibility on screen (i.e. using its position, width, height). Is there a good way to accomplish something like this in Compose?
a
for what definition of, "100% visible on screen?" 🙂 within bounds, unclipped, un-obscured by things layered above it...?
Modifier.onGloballyPositioned
is likely to play a role in the answer
🙌 1
m
Ideally all of the above but starting with just within bounds of screen's display at this point
Oh nice - ok I figured there was probably a callback that could be used. I can look into that modifier element to start. Thanks a lot!