Scroll View - scroll


#1

hey folks!
Is there any way to know if there is any more to scroll or not in listview/scrollview.
The main issue is I want to place a button in the footer of that view. Like a load more button.

I am using angular + nativescript


#2

Use scrollView.scrollableHeight - scrollView.verticalOffset to know how much further to reach the end of scroll view.


#3

thanks Manoj . I will try it out and get back to you.


#4

scrollable height is showing undefined for me I will share my code . If possible pls help.

<ListView [itemTemplateSelector]="templateSelector" [items]="groupedItems">

  <ng-template nsTemplateKey="header">
    <GridLayout rows='auto, *' columns='*,*'>
    </GridLayout>
  </ng-template>

  <ng-template nsTemplateKey="cell" let-item="item">
    <ScrollView (scroll)="onScroll($event)">
      <sd-sign-group (click)='onSignClicked($event)' [group]='item.item'></sd-sign-group>
    </ScrollView>
  </ng-template>

</ListView>

this is my view.