java.lang.Object | |
↳ | android.support.v7.util.AsyncListUtil.ViewCallback |
The callback that links AsyncListUtil
with the list view.
All methods are called on the main thread.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | HINT_SCROLL_ASC | Scrolling in ascending order (from lower to higher positions in the order of the backing storage). | |||||||||
int | HINT_SCROLL_DESC | Scrolling in descending order (from higher to lower positions in the order of the backing storage). | |||||||||
int | HINT_SCROLL_NONE | No scroll direction hint available. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compute a wider range of items that will be loaded for smoother scrolling.
| |||||||||||
Compute the range of visible item positions.
| |||||||||||
Called when the entire data set has changed.
| |||||||||||
Called when an item at the given position is loaded.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Scrolling in ascending order (from lower to higher positions in the order of the backing storage).
Scrolling in descending order (from higher to lower positions in the order of the backing storage).
No scroll direction hint available.
Compute a wider range of items that will be loaded for smoother scrolling.
If there is no scroll hint, the default implementation extends the visible range by half its length in both directions. If there is a scroll hint, the range is extended by its full length in the scroll direction, and by half in the other direction.
For example, if range
is {100, 200}
and scrollHint
is HINT_SCROLL_ASC
, then outRange
will be {50, 300}
.
However, if scrollHint
is HINT_SCROLL_NONE
, then
outRange
will be {50, 250}
range | Visible item range. |
---|---|
outRange | Extended range. |
scrollHint | The scroll direction hint. |
Compute the range of visible item positions.
outRange[0] is the position of the first visible item (in the order of the backing storage).
outRange[1] is the position of the last visible item (in the order of the backing storage).
Negative positions and positions greater or equal to getItemCount()
are invalid.
If the returned range contains invalid positions it is ignored (no item will be loaded).
outRange | The visible item range. |
---|
Called when the entire data set has changed.
Called when an item at the given position is loaded.
position | Item position. |
---|