public abstract class EndlessOnScrollListener extends java.lang.Object implements OnScrollListener
OnScrollListener that will trigger loading of further items when the end of the
list is reached.OnScrollListener.ScrollState| Constructor and Description |
|---|
EndlessOnScrollListener()
Creates a new
EndlessOnScrollListener that has a default threshold of 5 rows. |
EndlessOnScrollListener(int rowThreshold)
Creates a new
EndlessOnScrollListener with the given row threshold. |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
onReloadingTriggered(int firstRowItem,
int visibleRowCount,
int totalRowCount)
Callback method when the user reached the row threshold to load more items.
|
void |
onScroll(android.widget.ListView tableDataView,
int firstVisibleItem,
int visibleItemCount,
int totalItemCount)
Callback method to be invoked when the list or grid has been scrolled.
|
void |
onScrollStateChanged(android.widget.ListView view,
OnScrollListener.ScrollState scrollState)
Callback method to be invoked while the table data view is being scrolled.
|
public EndlessOnScrollListener()
EndlessOnScrollListener that has a default threshold of 5 rows. This means if
the user scrolls up to the 5th last row, a loading of further items is triggered.public EndlessOnScrollListener(int rowThreshold)
EndlessOnScrollListener with the given row threshold. The row threshold defines, when
the reloading is triggered. E.g. a rowThreshold of 3 would mean a loading is triggered when the user reaches
the 3rd last row.rowThreshold - The row threshold that shall be used.public void onScroll(android.widget.ListView tableDataView,
int firstVisibleItem,
int visibleItemCount,
int totalItemCount)
OnScrollListeneronScroll in interface OnScrollListenertableDataView - The view whose scroll state is being reported.firstVisibleItem - The index of the first visible row (ignore if visibleItemCount == 0).visibleItemCount - The number of visible rows.totalItemCount - The number of items in the TableDataAdapter.public void onScrollStateChanged(android.widget.ListView view,
OnScrollListener.ScrollState scrollState)
OnScrollListeneronScrollStateChanged in interface OnScrollListenerview - The view whose scroll state is being reported.scrollState - he current scroll state. One of OnScrollListener.ScrollState.TOUCH_SCROLL or OnScrollListener.ScrollState.IDLE.public abstract void onReloadingTriggered(int firstRowItem,
int visibleRowCount,
int totalRowCount)
firstRowItem - The index of the first visible row.visibleRowCount - The number of rows that are visible.totalRowCount - The total number of rows.