Search code examples
nativescriptangular2-nativescriptnativescript-angularnativescript-telerik-ui

NativeScript RadListView Scroll to bottom issue


I am using RadListView and I am trying to scroll to the bottom of the list. It works great on Android and iOS until I add a header to the RadList. Once I add a header on Android it will scroll to the second to the last item, not all the way down.

See playground example here.


Solution

  • I have updated the playground here. If you change it to

    this.radList.scrollToIndex(this._dataItems.length - 1, false, ListViewItemSnapMode.Auto);
    

    or

    this.radList.scrollToIndex(this._dataItems.length - 1, false);
    

    It works fine on both android and ios. ListViewItemSnapMode.Auto : The target item is snapped at the closest possible position which makes it clearly visible.