O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.


open class BrowseSupportFragment : BaseSupportFragment
   ↳ androidx.fragment.app.Fragment
   ↳ androidx.leanback.app.BrandedSupportFragment
   ↳ androidx.leanback.app.BaseSupportFragment
   ↳ androidx.leanback.app.BrowseSupportFragment

A fragment for creating Leanback browse screens. It is composed of a RowsSupportFragment and a HeadersSupportFragment.

A BrowseSupportFragment renders the elements of its ObjectAdapter as a set of rows in a vertical list. The elements in this adapter must be subclasses of Row.

The HeadersSupportFragment can be set to be either shown or hidden by default, or may be disabled entirely. See setHeadersState for details.

By default the BrowseSupportFragment includes support for returning to the headers when the user presses Back. For Activities that customize , you must disable this default Back key support by calling setHeadersTransitionOnBackEnabled(boolean) with false and use BrowseSupportFragment.BrowseTransitionListener and startHeadersTransition(boolean).

The recommended theme to use with a BrowseSupportFragment is androidx.leanback.R.style#Theme_Leanback_Browse.


Nested classes

Listener for transitions between browse headers and rows.


Factory class responsible for creating fragment given the current item.


Possible set of actions that BrowseSupportFragment exposes to clients.


FragmentFactory implementation for ListRow.


Interface that defines the interaction between BrowseSupportFragment and its main content fragment.


Interface to be implemented by all fragments for providing an instance of MainFragmentAdapter.

Registry class maintaining the mapping of Row subclasses to FragmentFactory.


This is used to pass information to RowsSupportFragment or its subclasses.


Interface to be implemented by RowsSupportFragment and its subclasses for providing an instance of MainFragmentRowsAdapter.

static Int

The headers fragment is disabled and will never be shown.

static Int

The headers fragment is enabled and shown by default.

static Int

The headers fragment is enabled and hidden by default.

Public constructors

A fragment for creating Leanback browse screens.

Public methods
open static Bundle!
createArgs(args: Bundle!, title: String!, headersState: Int)

Creates arguments for a browse fragment.

open Unit

Enables scaling of main fragment when headers are present.

open Unit

open ObjectAdapter!

Returns the adapter containing the rows for the fragment.

open Int

Returns the brand color for the browse fragment.

open Int

Returns the state of the headers column in the browse fragment.

open HeadersSupportFragment!

Get currently bound HeadersSupportFragment or null if HeadersSupportFragment has not been created yet.

open Fragment!


open OnItemViewClickedListener!

Returns the item Clicked listener.

open OnItemViewSelectedListener!

Returns an item selection listener.

open RowsSupportFragment!

Get RowsSupportFragment if it's bound to BrowseSupportFragment or null if either BrowseSupportFragment has not been created yet or a different fragment is bound to it.

open Int

Gets position of currently selected row.

open RowPresenter.ViewHolder!


Returns true if headers transition on back key support is enabled.

open Boolean

Returns true if the headers transition is currently running.

open Boolean

Returns true if headers are shown.

open Unit
onCreate(savedInstanceState: Bundle?)

open HeadersSupportFragment!

Creates a new HeadersSupportFragment instance.

open View?