2

enter image description here

I'm working with LazyVerticalGrid in Jetpack Compose where I have items with varying spans (e.g., some items take up 1 span, others take up 4 spans). I need to compute the verticalScrollRange() of the grid, but I'm unsure how to correctly account for the varying span sizes.

I understand that the scroll range should be calculated by considering the height of each item, but since the items have different span counts, I need a way to incorporate this into the scroll range calculation.

How can I compute the verticalScrollRange() correctly when the grid items have different span sizes? Is there a way to factor in the span count of each item in the grid to get an accurate scroll range?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.