https://kotlinlang.org logo
#compose
Title
# compose
n

Neal Sanche

03/08/2021, 4:08 AM
Does Jetpack Compose have a concept of providing
systemGestureExclusionRects
for gesture navigation? Alternatively, is it possible to obtain the screen bounds of a particular composable so I can use it to set these?
a

Andrey Kulikov

03/08/2021, 11:45 AM
you can use
Modifier.onGloballyPositioned
and
LayoutCoordinates.boundsInRoot()
n

Neal Sanche

03/08/2021, 7:49 PM
Thanks, I'll try those out. Much appreciated.
Works great, using
boundsInWindow()
worked for me here, I was able to exclude my camera-roll view, so that I can swipe it without the gestures kicking in near the edges of the screen.
3 Views