CursorObjectAdapter
open class CursorObjectAdapter : ObjectAdapter
kotlin.Any | ||
↳ | androidx.leanback.widget.ObjectAdapter | |
↳ | androidx.leanback.widget.CursorObjectAdapter |
An ObjectAdapter
implemented with a Cursor
.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>(presenterSelector: PresenterSelector!) Constructs an adapter with the given |
|
Constructs an adapter that uses the given |
|
<init>() Constructs an adapter. |
Public methods | |
---|---|
open Unit |
changeCursor(cursor: Cursor!) Changes the underlying cursor to a new cursor. |
open Unit |
close() Closes this adapter, closing the backing |
open Any! | |
Cursor! |
Returns the |
CursorMapper! |
Returns the |
open Boolean |
isClosed() Returns true if the adapter, and hence the backing |
open Boolean | |
Unit |
setMapper(mapper: CursorMapper!) Sets the |
open Int |
size() |
open Cursor! |
swapCursor(cursor: Cursor!) Swap in a new Cursor, returning the old Cursor. |
Protected methods | |
---|---|
Unit |
invalidateCache(index: Int) Removes an item from the cache. |
Unit |
invalidateCache(index: Int, count: Int) Removes |
open Unit |
Called whenever the cursor changes. |
open Unit |
Called when |
Inherited functions | |
---|---|
Public constructors
<init>
CursorObjectAdapter(presenterSelector: PresenterSelector!)
Constructs an adapter with the given PresenterSelector
.
<init>
CursorObjectAdapter(presenter: Presenter!)
Constructs an adapter that uses the given Presenter
for all items.
<init>
CursorObjectAdapter()
Constructs an adapter.
Public methods
changeCursor
open fun changeCursor(cursor: Cursor!): Unit
Changes the underlying cursor to a new cursor. If there is an existing cursor it will be closed if it is different than the new cursor.
Parameters | |
---|---|
cursor |
Cursor!: The new cursor to be used. |
getMapper
fun getMapper(): CursorMapper!
Returns the CursorMapper
used to convert Cursor
rows into Objects.
isClosed
open fun isClosed(): Boolean
Returns true if the adapter, and hence the backing Cursor
, is closed; false otherwise.
isImmediateNotifySupported
open fun isImmediateNotifySupported(): Boolean
setMapper
fun setMapper(mapper