HeadersSupportFragment

open class HeadersSupportFragment
kotlin.Any
   ↳ androidx.leanback.app.HeadersSupportFragment

An fragment containing a list of row headers. Implementation must support three types of rows:

Use #setPresenterSelector(PresenterSelector) in subclass constructor to customize Presenters. App may override BrowseSupportFragment#onCreateHeadersSupportFragment().

Summary

Nested classes
abstract

Interface definition for a callback to be invoked when a header item is clicked.

abstract

Interface definition for a callback to be invoked when a header item is selected.

Public constructors

Public methods
open Unit

open Unit

ObjectAdapter!

Returns the Adapter that represents list of rows.

open Unit

Sets the selected row position with smooth animation.

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

Sets the selected row position.

open Unit
setAlignment(windowAlignOffsetTop: Int)

Unit
setAdapter(rowsAdapter: ObjectAdapter!)

Sets the adapter that represents a list of rows.

ItemBridgeAdapter!

Returns the RecyclerView.

open Unit

open Unit

open Unit
onViewCreated(view: View, savedInstanceState: Bundle?)

open Unit

open Int

Gets position of currently selected row.

open Unit

PresenterSelector!

Get the presenter selector used to create and bind views.

Unit

Set the presenter selector used to create and bind views.

open Boolean

open Boolean

VerticalGridView!

open View!
onCreateView(inflater: LayoutInflater!, container: ViewGroup!, savedInstanceState: Bundle!)

Public constructors

<init>

HeadersSupportFragment()

Public methods

onTransitionEnd

open fun onTransitionEnd(): Unit

onDestroyView

open fun onDestroyView(): Unit

getAdapter

fun getAdapter(): ObjectAdapter!

Returns the Adapter that represents list of rows.

Return
ObjectAdapter!: Adapter that represents list of rows.

setSelectedPosition

open fun setSelectedPosition(position: Int): Unit

Sets the selected row position with smooth animation.

setSelectedPosition

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

Sets the selected row position.

setAlignment

open fun setAlignment(windowAlignOffsetTop: Int): Unit

setAdapter

fun setAdapter(rowsAdapter: ObjectAdapter!): Unit

Sets the adapter that represents a list of rows.

Parameters
rowsAdapter ObjectAdapter!: Adapter that represents list of rows.

getBridgeAdapter

fun getBridgeAdapter(): ItemBridgeAdapter!

Returns the RecyclerView.Adapter that wraps #getAdapter().

Return
ItemBridgeAdapter!: The RecyclerView.Adapter that wraps #getAdapter().

onSaveInstanceState

open fun onSaveInstanceState(outState: Bundle!): Unit

setOnHeaderClickedListener

open fun setOnHeaderClickedListener(listener: HeadersSupportFragment.OnHeaderClickedListener!): Unit

onViewCreated

open fun onViewCreated(view: View, savedInstanceState: Bundle?): Unit

onTransitionStart

open fun onTransitionStart(): Unit

getSelectedPosition

open fun getSelectedPosition(): Int

Gets position of currently selected row.

Return
Int: Position of currently selected row.

setOnHeaderViewSelectedListener

open fun setOnHeaderViewSelectedListener(listener: HeadersSupportFragment.OnHeaderViewSelectedListener!): Unit

getPresenterSelector

fun getPresenterSelector(): PresenterSelector!

Get the presenter selector used to create and bind views.

setPresenterSelector

fun setPresenterSelector(presenterSelector: PresenterSelector!): Unit

Set the presenter selector used to create and bind views.

isScrolling

open fun isScrolling(): Boolean

onTransitionPrepare

open fun onTransitionPrepare(): Boolean

getVerticalGridView

fun getVerticalGridView(): VerticalGridView!

onCreateView

open fun onCreateView(inflater: LayoutInflater!, container: ViewGroup!, savedInstanceState: Bundle!): View!