| java.lang.Object | ||
| ↳ | android.support.v17.leanback.widget.ObjectAdapter | |
| ↳ | android.support.v17.leanback.widget.ArrayObjectAdapter | |
An ObjectAdapter implemented with an ArrayList.
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v17.leanback.widget.ObjectAdapter
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Construct an adapter with the given
PresenterSelector.
| |||||||||||
Construct an adapter that uses the given
Presenter for all items.
| |||||||||||
Construct an adapter.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Inserts an item into this adapter at the specified index.
| |||||||||||
Adds an item to the end of the adapter.
| |||||||||||
Adds the objects in the given collection to the adapter, starting at the
given index.
| |||||||||||
Removes all items from this adapter, leaving it empty.
| |||||||||||
Returns the item for the given position.
| |||||||||||
Returns the index for the first occurrence of item in the adapter, or -1 if
not found.
| |||||||||||
Notify that the content of a range of items changed.
| |||||||||||
Removes the first occurrence of the given item from the adapter.
| |||||||||||
Removes a range of items from the adapter.
| |||||||||||
Replaces item at position with a new item and calls notifyItemRangeChanged()
at the given position.
| |||||||||||
Returns the number of items in the adapter.
| |||||||||||
Gets a read-only view of the list of object of this ArrayObjectAdapter.
| |||||||||||
|
[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 that uses the given Presenter for all items.
Construct an adapter.
Inserts an item into this adapter at the specified index.
If the index is >= size() an exception will be thrown.
| index | The index at which the item should be inserted. |
|---|---|
| item | The item to insert into the adapter. |
Adds an item to the end of the adapter.
| item | The item to add to the end of the adapter. |
|---|
Adds the objects in the given collection to the adapter, starting at the
given index. If the index is >= size() an exception will be thrown.
| index | The index at which the items should be inserted. |
|---|---|
| items | A Collection of items to insert.
|
Removes all items from this adapter, leaving it empty.
Returns the index for the first occurrence of item in the adapter, or -1 if not found.
| item | The item to find in the list. |
|---|
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. |
Removes the first occurrence of the given item from the adapter.
| item | The item to remove from the adapter. |
|---|
Removes a range of items from the adapter. The range is specified by giving the starting position and the number of elements to remove.
| position | The index of the first item to remove. |
|---|---|
| count | The number of items to remove. |
Replaces item at position with a new item and calls notifyItemRangeChanged() at the given position. Note that this method does not compare new item to existing item.
| position | The index of item to replace. |
|---|---|
| item | The new item to be placed at given position. |
Returns the number of items in the adapter.
Gets a read-only view of the list of object of this ArrayObjectAdapter.