belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
ObjectAdapter
public
abstract
class
ObjectAdapter
extends Object
java.lang.Object | |
↳ | android.support.v17.leanback.widget.ObjectAdapter |
![]() |
Base class adapter to be used in leanback activities. Provides access to a data model and is
decoupled from the presentation of the items via PresenterSelector
.
Summary
Nested classes | |
---|---|
class |
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 | |
---|---|
ObjectAdapter(PresenterSelector presenterSelector)
Constructs an adapter with the given |
|
ObjectAdapter(Presenter presenter)
Constructs an adapter that uses the given |
|
ObjectAdapter()
Constructs an adapter. |
Public methods | |
---|---|
abstract
Object
|
get(int position)
Returns the item for the given position. |
long
|
getId(int position)
Returns the id for the given position. |
final
Presenter
|
getPresenter(Object item)
Returns the |
final
PresenterSelector
|
getPresenterSelector()
Returns the presenter selector for this ObjectAdapter. |
final
boolean
|
hasStableIds()
Returns true if the item ids are stable across changes to the underlying data. |
boolean
|
isImmediateNotifySupported()
Returns true if the adapter pairs each underlying data change with a call to notify and false otherwise. |
final
void
|
notifyItemRangeChanged(int positionStart, int itemCount, Object payload)
Notifies UI that some items has changed. |
final
void
|
|