I am using TableLayout. which have 100 of items to make it scrollable I am using Tablelayout inside ScrollView. But I have to detect whether the user have scrolled to the last row. If the user have scrolled to the last view then user will be shown a Toast message.
But How to know that the user has scrolled to the last row of the tablelayout. I have referred the code from TableLayout inside ScrollView.
I am using TableLayout. which have 100 of items to make it scrollable I
Share
If new scrolled y position + scroll view height >= tableview height that means you have reached the end of list.
To achieve this you have to write your custiom scrollview.
Step-1 You have to create custom scroll view extending ScrollView
Step-2 Create a Listener to detect scrollchanged
package com.sunil;
import LDObservableScrollView;
Step-3 in layout xml instead of ScrollView use the custom scroll view
Step-4 In your activity class or where you want to detect the scroll event use the follwoing code