{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class ItemSnapshotList<T : Any?>
Snapshot of data being presented by a androidx.pagingAsyncPagingDataDiffer or a PagingDataAdapter
.
Public properties |
|
---|---|
List<T> |
The presented data, excluding placeholders. |
Int |
Number of placeholders after the presented |
Int |
Number of placeholders before the presented |
open Int |
Size of |
Public constructors |
|
---|---|
Public functions |
|
---|---|
open operator T? |
Returns the item at |
Inherited functions |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||
|
||||||||||||||||
|
val placeholdersAfter: Int
Number of placeholders after the presented items
, 0 if enablePlaceholders
is false
.
val placeholdersBefore: Int
Number of placeholders before the presented items
, 0 if enablePlaceholders
is false
.
open val size: Int
Size of ItemSnapshotList
including placeholders.
To get the size excluding placeholders, use List.size
on items
directly.
See also | |
---|---|
items |
<T : Any?> ItemSnapshotList(
@IntRange placeholdersBefore: Int,
@IntRange placeholdersAfter: Int,
items: List<T>
)