RadListView provides API that allows developers to manually scroll to a particular item or with particular offset. It also exposes several events that can be used to detect changes in the scroll offset triggered by the end user. The following methods related to Scrolling are available:
scrollWithAmount()- scrolls the list with a given amount of pixels. If the
true- the scrolling will be animated
scrollToIndex()- scrolls the list so that the data item at the particular index is brought to visibility. If the
true- the scrolling will be animated. The value of the
snapModeargument determines the position of the target item when it is brought into view. The possible values for this argument are enlisted by the
getScrollOffset()- returns the current scroll offset of the list
You can use the following events to detect changes in the scrolling behavior of
scrollStartedEvent- fired when the list starts scrolling
scrolledEvent- fired each time the scroll offset of the list is changed
scrollEndedEvent- fired when the list stops scrolling
Want to see this scenario in action?
Check our SDK examples repo on GitHub. You will find this and many other practical examples with NativeScript UI.