VerticalGridFragment

open class VerticalGridFragment : BaseFragment
kotlin.Any
   ↳ android.app.Fragment
   ↳ androidx.leanback.app.BrandedFragment
   ↳ androidx.leanback.app.BaseFragment
   ↳ androidx.leanback.app.VerticalGridFragment

A fragment for creating leanback vertical grids.

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

Summary

Public constructors

use VerticalGridSupportFragment

Public methods
open ObjectAdapter!

Returns the object adapter.

open Unit

Sets an item clicked listener.

open Unit

open Unit

Sets an item selection listener.

open VerticalGridPresenter!

Returns the grid presenter.

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

open Unit

Sets the selected item position.

open Unit

Sets the object adapter for the fragment.

open Unit

open OnItemViewClickedListener!

Returns the item clicked listener.

open Unit

Sets the grid presenter.

Protected methods
open Any!

open Unit
runEntranceTransition(entranceTransition: Any!)

Inherited functions

Public constructors

<init>

VerticalGridFragment()

Deprecated: use 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.

onStart

open fun onStart(): Unit

setOnItemViewSelectedListener

open fun setOnItemViewSelectedListener(listener: OnItemViewSelectedListener!): Unit

Sets an item selection listener.

getGridPresenter

open fun getGridPresenter(): VerticalGridPresenter!

Returns the grid presenter.

onCreateView

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

setSelectedPosition

open fun setSelectedPosition(position: Int): Unit

Sets the selected item position.

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.

setGridPresenter

open fun setGridPresenter(gridPresenter: VerticalGridPresenter!): Unit

Sets the grid presenter.

Protected methods

createEntranceTransition

protected open fun createEntranceTransition(): Any!

runEntranceTransition

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