extendRangeInto
open fun extendRangeInto(@NonNull range: Array<Int>, @NonNull outRange: Array<Int>, scrollHint: Int)(source)
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}
Parameters
range
Visible item range.
outRange
Extended range.
scrollHint
The scroll direction hint.