Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

BrowseFragment

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

A fragment for creating Leanback browse screens. It is composed of a RowsFragment and a HeadersFragment.

A BrowseFragment 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 HeadersFragment can be set to be either shown or hidden by default, or may be disabled entirely. See setHeadersState for details.

By default the BrowseFragment 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 BrowseFragment.BrowseTransitionListener and startHeadersTransition(boolean).

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

Summary

Nested classes
open

Listener for transitions between browse headers and rows.

abstract

Factory class responsible for creating fragment given the current item.

abstract

Possible set of actions that BrowseFragment exposes to clients.

open

FragmentFactory implementation for ListRow.

open

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

abstract

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

Registry class maintaining the mapping of Row subclasses to FragmentFactory.

open

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

abstract

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

Constants
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 HeadersFragment!

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

open Int

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

open Fragment!

BrowseFragment.MainFragmentAdapterRegistry!

open OnItemViewClickedListener!

Returns the item Clicked listener.

open OnItemViewSelectedListener!

Returns an item selection listener.

open RowsFragment!

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

open Int

Gets position of currently selected row.

open RowPresenter.ViewHolder!

Boolean

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 HeadersFragment!

Creates a new HeadersFragment instance.

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