CursorObjectAdapter
public
class
CursorObjectAdapter
extends ObjectAdapter
| java.lang.Object | ||
| ↳ | androidx.leanback.widget.ObjectAdapter | |
| ↳ | androidx.leanback.widget.CursorObjectAdapter | |
An ObjectAdapter implemented with a Cursor.
Summary
Inherited constants |
|---|
Public constructors | |
|---|---|
CursorObjectAdapter(PresenterSelector presenterSelector)
Constructs an adapter with the given |
|
CursorObjectAdapter(Presenter presenter)
Constructs an adapter that uses the given |
|
CursorObjectAdapter()
Constructs an adapter. |
|
Public methods | |
|---|---|
void
|
changeCursor(Cursor cursor)
Changes the underlying cursor to a new cursor. |
void
|
close()
Closes this adapter, closing the backing |
Object
|
get(int index)
Returns the item for the given position. |
final
Cursor
|
getCursor()
Returns the |
final
CursorMapper
|
getMapper()
Returns the |
boolean
|
isClosed()
Returns true if the adapter, and hence the backing |
boolean
|
isImmediateNotifySupported()
Returns true if the adapter pairs each underlying data change with a call to notify and false otherwise. |
final
void
|
setMapper(CursorMapper mapper)
Sets the |
int
|
size()
Returns the number of items in the adapter. |
Cursor
|
swapCursor(Cursor cursor)
Swap in a new Cursor, returning the old Cursor. |
Protected methods | |
|---|---|
final
void
|
invalidateCache(int index)
Removes an item from the cache. |
final
void
|
invalidateCache(int index, int count)
Removes |
void
|
onCursorChanged()
Called whenever the cursor changes. |
void
|
onMapperChanged()
Called when |
Inherited methods | |
|---|---|