RadListView: Scrolling

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 animate parameter is 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 animate argument is true - the scrolling will be animated
  • scrollToIndex() - scrolls the list so that the data item at the particular index is brought to visibility
  • getScrollOffset() - returns the current scroll offset of the list

Scroll Events

You can use the following events to detect changes in the scrolling behavior of RadListView:

All scrolling events provide an instance of the ListViewScrollEventData class to their handlers which provides the current scroll offset of the list through its scrollOffset property.

References

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.