public interface IListRenderer
IListProvider
.Modifier and Type | Field and Description |
---|---|
static int |
ROW_ANIMATION_STYLE_NONE
The default row animation.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteRow(int row,
int animationStyle)
Removes the given row from ListView.
|
void |
deleteRows(int startRow,
int count,
int animationStyle)
Deletes cells at the given position
|
void |
enablePullToRefresh(boolean enable)
Defines if the top spinner should be visible by pulling the content down.
|
IListProvider |
getDelegate()
Get the current
IListProvider delegate associated with this list
renderer. |
int |
getFirstVisibleRow()
Returns the first visible row.
|
nUIDisplayObject |
getHeader()
Returns the current header.
|
int |
getLastVisibleRow()
Returns the last visible row.
|
IListActionListener |
getListActionListener() |
IListListener |
getListListener()
Gets the current
IListListener . |
int |
getScrollPosition()
Return the current scroll position.
|
void |
hideSpinner(int type)
Hides the spinner.
|
void |
insertRow(int row,
int animationStyle)
Inserts a new cell at the position
row . |
void |
insertRows(int startRow,
int count,
int animationStyle)
Inserts new cells the given position
startRow . |
boolean |
isSpinnerVisible(int type)
Checks if the spinner is visible
|
void |
scrollTo(int scrollPosition,
boolean animated)
Scroll to the given position.
|
void |
scrollToRow(int row,
boolean animated)
Scrolls to the given row, so that it will be displayed as the first
visible row.
|
void |
setCustomSpinner(int type,
nUIDisplayObject customSpinner) |
void |
setDelegate(IListProvider delegate)
Set the delegate
IListProvider associated with this list
renderer. |
void |
setHeader(nUIDisplayObject header)
Sets the header for the list view that will be scrolled together with content.
|
void |
setListActionListener(IListActionListener listener) |
void |
setListListener(IListListener listener)
Sets a
IListListener to be used for callbacks. |
void |
setScrollThreshold(int threshold)
Sets the threshold number for scrolling.
|
void |
showSpinner(int type)
Shows spinner at the top or bottom to indicate that data is not yet
available.
|
IListEditMode |
startEditMode(IListEditModeListener listener) |
void |
update()
Call this method when dataset has been changed to reflect the changes in
UI.
|
void |
updateRow(int row,
int animationStyle)
Updates the cell at the given position
|
void |
updateRows(int startRow,
int count,
int animationStyle)
Updates cells at the given position
|
static final int ROW_ANIMATION_STYLE_NONE
IListEditMode startEditMode(IListEditModeListener listener)
void setHeader(nUIDisplayObject header)
header
- - header to be displayed at the top of the list view.nUIDisplayObject getHeader()
null
if no header has been set.void setDelegate(IListProvider delegate)
IListProvider
associated with this list
renderer. Must not be null
.delegate
- The delegate to set.IListProvider getDelegate()
IListProvider
delegate associated with this list
renderer.void setListListener(IListListener listener)
IListListener
to be used for callbacks.listener
- - the listener to set.IListListener getListListener()
IListListener
.void setListActionListener(IListActionListener listener)
IListActionListener getListActionListener()
int getScrollPosition()
void scrollTo(int scrollPosition, boolean animated)
scrollPosition
- void scrollToRow(int row, boolean animated)
row
- - to be scrolled to.animated
- true if the scrolling should be animated, otherwise false.int getFirstVisibleRow()
int getLastVisibleRow()
void setScrollThreshold(int threshold)
IListListener.onScrollThresholdReached()
method will be called
when the number of elements which can be scrolled is less then the
threshold. It can be used to implement an "infinite" scrolling effect.threshold
- - number of rows which are not yet displayed.void showSpinner(int type)
type
- use IListListener.POSITION_TOP
to show the spinner at
the top, and IListListener.POSITION_BOTTOM
at the
bottom.void setCustomSpinner(int type, nUIDisplayObject customSpinner)
type
- use IListListener.POSITION_TOP
to use custom spinner
at the top, and IListListener.POSITION_BOTTOM
at the
bottom.customSpinner
- can be anything that makes sense. Pass null
to
show the default spinner.void hideSpinner(int type)
type
- one of the IListListener.POSITION_TOP
or
IListListener.POSITION_BOTTOM
boolean isSpinnerVisible(int type)
type
- use IListListener.POSITION_TOP
to show the spinner at
the top, and IListListener.POSITION_BOTTOM
at the
bottom.void enablePullToRefresh(boolean enable)
enable
- true - the top spinner will appear and the
IListListener.onRefresh()
method will be called by
pulling the content down. false - the top spinner won't appear
and the IListListener.onRefresh()
won't be called.void deleteRow(int row, int animationStyle)
row
- - the row to be removedanimationStyle
- - the animation style.void insertRow(int row, int animationStyle)
row
.row
- - the position to add a new row.animationStyle
- - the animation style.void updateRow(int row, int animationStyle)
row
- - position to update.animationStyle
- - the animation style.void deleteRows(int startRow, int count, int animationStyle)
startRow
- - the start positioncount
- - amount of cells to be deleted.animationStyle
- the animation stylevoid insertRows(int startRow, int count, int animationStyle)
startRow
. The old
positionstartRow
- - the start position of the new cellcount
- - amount of cellsanimationStyle
- void updateRows(int startRow, int count, int animationStyle)
startRow
- - the start positioncount
- - amount of cells to be updated.animationStyle
- - the animation style.void update()