Should `Modifier.systemGestureExclusion` work even...
# compose
s
Should
Modifier.systemGestureExclusion
work even if my composable doesn't touch the edge of the screen? I got a composable which is rendered 8.dp away from the edge of the screen. I then pass
Copy code
.systemGestureExclusion { coordinates ->
  val boundsInRoot = coordinates.boundsInRoot()
  Rect(
    boundsInRoot.left,
    <http://boundsInRoot.top|boundsInRoot.top>,
    boundsInRoot.right,
    boundsInRoot.bottom,
  ).inflate(with(density) { 16.dp.toPx() })
}
With the hope that my "exclusion" Rect will then properly touch the edges. My composable itself is like 64.dp high, so at most I would be excluding <100.dp, which seems to be within the limit of 200.dp that we can exclude Anyone who has tried to do the same?
Ended up making the composable just go all the way to the edge, applied
.systemGestureExclusion()
to it, and then added the padding so that it visually still looks the same. This works well now, so not if this API does in fact work if the composable does not already touch the edges 🤷 Maybe I did something wrong, but I am not sure