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

colintheshots

10/04/2023, 4:19 PM
Is there any way to limit a BringIntoViewRequester to scrolling vertically only? I have a LazyColumn inside a HorizontalPager (with userScrollEnabled = false). The item is not offscreen horizontally.
c

Chris Fillmore

10/04/2023, 5:04 PM
What is the problem exactly?
c

colintheshots

10/04/2023, 5:32 PM
When I called
bringIntoViewRequester.bringIntoView()
, it shifts the
LazyColumn
vertically as well as the
HorizontalPager
horizontally. However, I do not want to move the pager horizontally. It's a stepper flow so the user cannot control horizontal scrolling except by pressing buttons to advance to the next or previous step. It's undesirable to scroll horizontally when we want to stay fully on the same page.
The item being brought into view is a small text Box that is fully inside the view horizontally.