Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

MainFragmentRowsAdapter

open class MainFragmentRowsAdapter<T : Fragment!>
kotlin.Any
   ↳ androidx.leanback.app.BrowseSupportFragment.MainFragmentRowsAdapter

This is used to pass information to RowsSupportFragment or its subclasses. BrowseSupportFragment uses this interface to pass row based interaction events to the target fragment.

Summary

Public constructors
<init>(fragment: T)

Public methods
open Unit
setSelectedPosition(rowPosition: Int, smooth: Boolean, rowHolderTask: Presenter.ViewHolderTask!)

Selects a Row and perform an optional task on the Row.

open Unit
setSelectedPosition(rowPosition: Int, smooth: Boolean)

Selects a Row.

open Unit

Sets an item selection listener.

open Unit

Set the visibility titles/hover of browse rows.

open Unit

Sets an item clicked listener on the fragment.

open RowPresenter.ViewHolder!

T

open Int

Public constructors

<init>

MainFragmentRowsAdapter(fragment: T)

Public methods

setSelectedPosition

open fun setSelectedPosition(rowPosition: Int, smooth: Boolean, rowHolderTask: Presenter.ViewHolderTask!): Unit

Selects a Row and perform an optional task on the Row.

setSelectedPosition

open fun setSelectedPosition(rowPosition: Int, smooth: Boolean): Unit

Selects a Row.

setOnItemViewSelectedListener

open fun setOnItemViewSelectedListener(listener: OnItemViewSelectedListener!): Unit

Sets an item selection listener.

setAdapter

open fun setAdapter(adapter: ObjectAdapter!): Unit

Set the visibility titles/hover of browse rows.

setOnItemViewClickedListener

open fun setOnItemViewClickedListener(listener: OnItemViewClickedListener!): Unit

Sets an item clicked listener on the fragment.

findRowViewHolderByPosition

open fun findRowViewHolderByPosition(position: Int): RowPresenter.ViewHolder!
Parameters
position Int: Position of Row.
Return
RowPresenter.ViewHolder!: Row ViewHolder.

getFragment

fun getFragment(): T

getSelectedPosition

open fun getSelectedPosition(): Int
Return
Int: The position of selected row.