java.lang.Object | |
↳ | android.support.v17.leanback.widget.ObjectAdapter |
Known Direct Subclasses |
Adapter for leanback activities. Provides access to a data model and is
decoupled from the presentation of the items via PresenterSelector
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ObjectAdapter.DataObserver | A DataObserver can be notified when an ObjectAdapter's underlying data changes. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | NO_ID | Indicates that an id has not been set. |
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the item for the given position.
| |||||||||||
Returns id for the given position.
| |||||||||||
Returns the
Presenter for the given item from the adapter. | |||||||||||
Returns the presenter selector for this ObjectAdapter.
| |||||||||||
Indicates whether the item ids are stable across changes to the
underlying data.
| |||||||||||
Register a DataObserver for data change notifications.
| |||||||||||
Sets whether the item ids are stable across changes to the underlying
data.
| |||||||||||
Set the presenter selector.
| |||||||||||
Returns the number of items in the adapter.
| |||||||||||
Unregister all DataObservers for this ObjectAdapter.
| |||||||||||
Unregister a DataObserver for data change notifications.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when
setHasStableIds(boolean) is called and the status
of stable ids has changed. | |||||||||||
Called when
setPresenterSelector(PresenterSelector) is called
and the PresenterSelector differs from the previous one. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Indicates that an id has not been set.
Construct an adapter with the given PresenterSelector
.
Construct an adapter that uses the given Presenter
for all items.
Construct an adapter.
Returns id for the given position.
Returns the Presenter
for the given item from the adapter.
Returns the presenter selector for this ObjectAdapter.
Indicates whether the item ids are stable across changes to the
underlying data. When this is true, clients of the ObjectAdapter can use
getId(int)
to correlate Objects across changes.
Register a DataObserver for data change notifications.
Sets whether the item ids are stable across changes to the underlying data.
Set the presenter selector. May not be null.
Returns the number of items in the adapter.
Unregister all DataObservers for this ObjectAdapter.
Unregister a DataObserver for data change notifications.
Called when setHasStableIds(boolean)
is called and the status
of stable ids has changed.
Called when setPresenterSelector(PresenterSelector)
is called
and the PresenterSelector differs from the previous one.