public interface IListListener
Modifier and Type | Field and Description |
---|---|
static int |
POSITION_BOTTOM
The constant indicates the bottom scroll bound has been reached.
|
static int |
POSITION_TOP
The constant indicates the top scroll bound has been reached.
|
static int |
SCROLL_STATE_DRAGGING
The view is being dragged by user.
|
static int |
SCROLL_STATE_IDLE
The view is not currently scrolling.
|
static int |
SCROLL_STATE_SCROLLING
The view is currently scrolling.
|
Modifier and Type | Method and Description |
---|---|
void |
onFocusGained(int rowIndex,
nUIDisplayObject cell)
Will be called when the row has gained a focus.
|
void |
onFocusLost(int rowIndex,
nUIDisplayObject cell)
Will be called when the row has lost a focus.
|
void |
onRefresh()
Will be called when swipe gesture trigger a refresh and shows the top
spinner.
|
void |
onRowSelected(int rowIndex,
nUIDisplayObject cell)
Will be called when the row has been selected
|
void |
onScrollBoundReached(int type)
Will be called when the scroll bounding has been reached by user try to
scroll further.
|
void |
onScrollStateChanged(int state)
Will be called once the scroll state has been changed.
|
void |
onScrollThresholdReached()
Will be called then the scroll threshold set by
IListRenderer.setScrollThreshold(int) is reached. |
static final int SCROLL_STATE_IDLE
static final int SCROLL_STATE_DRAGGING
static final int SCROLL_STATE_SCROLLING
static final int POSITION_TOP
static final int POSITION_BOTTOM
void onRowSelected(int rowIndex, nUIDisplayObject cell)
rowIndex
- - the selected row index.cell
- - the selected cellvoid onFocusGained(int rowIndex, nUIDisplayObject cell)
rowIndex
- - the row indexcell
- - the cell objectvoid onFocusLost(int rowIndex, nUIDisplayObject cell)
rowIndex
- - the row index.cell
- - the cell objectvoid onScrollBoundReached(int type)
type
- - POSITION_TOP
- top bound is reached,
POSITION_BOTTOM
- bottom bound is reached.void onScrollThresholdReached()
IListRenderer.setScrollThreshold(int)
is reached. You can use the
callback to load more data before the scroll bound is reached.IMDApplication.runAsync(Runnable)
method or
similar to accomplish the task asynchronously. After the new data
is available call IListRenderer.update()
to reflect the
changes in UI.void onScrollStateChanged(int state)
state
- one of the SCROLL_STATE_IDLE
,
SCROLL_STATE_DRAGGING
or
SCROLL_STATE_SCROLLING
void onRefresh()