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

VerticalGridSupportFragment

open class VerticalGridSupportFragment : BaseSupportFragment
kotlin.Any
   ↳ androidx.fragment.app.Fragment
   ↳ androidx.leanback.app.BrandedSupportFragment
   ↳ androidx.leanback.app.BaseSupportFragment
   ↳ androidx.leanback.app.VerticalGridSupportFragment

A fragment for creating leanback vertical grids.

Renders a vertical grid of objects given a VerticalGridPresenter and an ObjectAdapter.

Summary

Public constructors

A fragment for creating leanback vertical grids.

Public methods
open ObjectAdapter!

Returns the object adapter.

open Unit

Sets an item clicked listener.

open Unit

Sets an item selection listener.

open VerticalGridPresenter!

Returns the grid presenter.

open Unit

Sets the selected item position.

open Unit

Sets the grid presenter.

open Unit

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

open Unit

Sets the object adapter for the fragment.

open Unit

open OnItemViewClickedListener!

Returns the item clicked listener.

Protected methods
open Any!

open Unit
runEntranceTransition(entranceTransition: Any!)

Inherited functions

Public constructors

<init>

VerticalGridSupportFragment()

A fragment for creating leanback vertical grids.

Renders a vertical grid of objects given a VerticalGridPresenter and an ObjectAdapter.

Public methods

getAdapter

open fun getAdapter(): ObjectAdapter!

Returns the object adapter.

setOnItemViewClickedListener

open fun setOnItemViewClickedListener(listener: OnItemViewClickedListener!): Unit

Sets an item clicked listener.

setOnItemViewSelectedListener

open fun setOnItemViewSelectedListener(listener: OnItemViewSelectedListener!): Unit

Sets an item selection listener.

getGridPresenter

open fun getGridPresenter(): VerticalGridPresenter!

Returns the grid presenter.

setSelectedPosition

open fun setSelectedPosition(position: Int): Unit

Sets the selected item position.

setGridPresenter

open fun setGridPresenter(gridPresenter: VerticalGridPresenter!): Unit

Sets the grid presenter.

onStart

open fun onStart(): Unit

onCreateView

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

setAdapter

open fun setAdapter(adapter: ObjectAdapter!): Unit

Sets the object adapter for the fragment.

onDestroyView

open fun onDestroyView(): Unit

getOnItemViewClickedListener

open fun getOnItemViewClickedListener(): OnItemViewClickedListener!

Returns the item clicked listener.

Protected methods

createEntranceTransition

protected open fun createEntranceTransition(): Any!

runEntranceTransition

protected open fun runEntranceTransition(entranceTransition: Any!): Unit