java.lang.Object | ||
↳ | android.support.v17.leanback.widget.ObjectAdapter | |
↳ | android.support.v17.leanback.widget.SparseArrayObjectAdapter |
An ObjectAdapter implemented with a SparseArray
.
This class maintains an array of objects where each object is associated
with an integer key which determines its order relative to other objects.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v17.leanback.widget.ObjectAdapter
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct an adapter with the given
PresenterSelector .
| |||||||||||
Construct an adapter with the given
Presenter .
| |||||||||||
Construct an adapter.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes all items from this adapter, leaving it empty.
| |||||||||||
Clears the given key and associated item from the adapter.
| |||||||||||
Returns the item for the given position.
| |||||||||||
Returns the index for the given item in the adapter.
| |||||||||||
Returns the index for the given key in the adapter.
| |||||||||||
Returns the object for the given key, or null if no mapping for that key exists.
| |||||||||||
Notify that the content of a range of items changed.
| |||||||||||
Sets the item for the given key.
| |||||||||||
Returns the number of items in the adapter.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v17.leanback.widget.ObjectAdapter
| |||||||||||
From class
java.lang.Object
|
Construct an adapter with the given PresenterSelector
.
Construct an adapter with the given Presenter
.
Construct an adapter.
Removes all items from this adapter, leaving it empty.
Clears the given key and associated item from the adapter.
key | The key to be cleared. |
---|
Returns the index for the given item in the adapter.
item | The item to find in the array. |
---|
Returns the index for the given key in the adapter.
key | The key to find in the array. |
---|
Returns the object for the given key, or null if no mapping for that key exists.
Notify that the content of a range of items changed. Note that this is not same as items being added or removed.
positionStart | The position of first item that has changed. |
---|---|
itemCount | The count of how many items have changed. |
Sets the item for the given key.
key | The key associated with the item. |
---|---|
item | The item associated with the key. |
Returns the number of items in the adapter.