https://kotlinlang.org logo
d

Diego Marulanda

06/07/2020, 3:45 AM
hi, how can I make my
HorizontalScroller
scroll to a specific point? I mean, I have several images in a
HorizontalScroller
and I need that when the user performs the scroll this movement continues so that the image that is seeing at that moment it is centered, for example, if the user stops scrolling in the middle of the first and the second image, the scroll completes the movement until only one of the 2 images is seen
z

Zach Klippenstein (he/him) [MOD]

06/07/2020, 4:21 AM
You have access to and control of the
ScrollerPosition
, I think you could implement that behavior with that
h

henrikhorbovyi

06/07/2020, 5:17 AM
It is like a PageView or a carousel behavior.
I was wondering if there is a composable to do it.
d

Diego Marulanda

06/08/2020, 9:21 PM
Would you give me a example about how to use that please? i don't find any sample code in Jetnews or other repositories
3 Views