added in version 22.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

CursorObjectAdapter

public class CursorObjectAdapter
extends ObjectAdapter

java.lang.Object
   ↳ android.support.v17.leanback.widget.ObjectAdapter
     ↳ android.support.v17.leanback.widget.CursorObjectAdapter


An ObjectAdapter implemented with a Cursor.

Summary

Inherited constants

From class android.support.v17.leanback.widget.ObjectAdapter

Public constructors

CursorObjectAdapter(PresenterSelector presenterSelector)

Constructs an adapter with the given PresenterSelector.

CursorObjectAdapter(Presenter presenter)

Constructs an adapter that uses the given Presenter for all items.

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 Cursor as well.

Object get(int index)

Returns the item for the given position.

final Cursor getCursor()

Returns the Cursor backing the adapter.

final CursorMapper getMapper()

Returns the CursorMapper used to convert Cursor rows into Objects.

boolean isClosed()

Returns true if the adapter, and hence the backing Cursor, is closed; false otherwise.

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 CursorMapper used to convert Cursor rows into Objects.

int size()

Returns the number of items in the adapter.

Cursor swapCursor(