[Q] I have the following layout: ```LazyColumn(mo...
# compose
e
[Q] I have the following layout:
Copy code
LazyColumn(modifier = Modifier.fillMaxSize()) {
  item {
    Box(modifier = Modifier.fillMaxWidth().height(200.dp))
  }
  items(100) {
    Text(text = stringResource(id = R.string.long_text))
  }
}
When I scroll down, the Box is out of the screen, but not enough for it to be disposed. How can I tell that the Box is out of the screen or not without using LazyListState? (So something that works even when the LazyColumn is replaced by a scrollable Column).
f
Did you try using the
.onGloballyPositioned
modifier?
e
@Felix Schütz I did but the callback is not called after the item is off-screened. And there is no signal about the timing of it becomeing off-screen.
f
Well at least it tells you whether ist nearly out of screen 😄 🙈