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


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

A fragment for creating Leanback details screens.

A DetailsSupportFragment renders the elements of its ObjectAdapter as a set of rows in a vertical list.The Adapter's PresenterSelector must maintain subclasses of RowPresenter.

When FullWidthDetailsOverviewRowPresenter is found in adapter, DetailsSupportFragment will setup default behavior of the DetailsOverviewRow:
  • The alignment of FullWidthDetailsOverviewRowPresenter is setup in setupDetailsOverviewRowPresenter(FullWidthDetailsOverviewRowPresenter).
  • The view status switching of FullWidthDetailsOverviewRowPresenter is done in onSetDetailsOverviewRowStatus(FullWidthDetailsOverviewRowPresenter, * FullWidthDetailsOverviewRowPresenter.ViewHolder, int, int, int).
  • The recommended activity themes to use with a DetailsSupportFragment are

  • androidx.leanback.R.style#Theme_Leanback_Details with activity shared element transition for FullWidthDetailsOverviewRowPresenter.
  • androidx.leanback.R.style#Theme_Leanback_Details_NoSharedElementTransition if shared element transition is not needed, for example if first row is not rendered by FullWidthDetailsOverviewRowPresenter.
  • DetailsSupportFragment can use DetailsSupportFragmentBackgroundController to add a parallax drawable background and embedded video playing fragment.


    Public constructors

    A fragment for creating Leanback details screens.

    Public methods
    open ObjectAdapter!

    Returns the list of rows.

    open BaseOnItemViewClickedListener<Any!>!

    Returns the item clicked listener.

    open DetailsParallax!

    Returns the DetailsParallax instance used by DetailsSupportFragmentBackgroundController to configure parallax effect of background and control embedded video playback.

    open RowsSupportFragment!

    Gets embedded RowsSupportFragment showing multiple rows for DetailsSupportFragment.

    open Unit
    onCreate(savedInstanceState: Bundle?)

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

    open Unit

    open View!
    onInflateTitleView(inflater: LayoutInflater!, parent: ViewGroup!, savedInstanceState: Bundle!)

    open Unit

    open Unit

    open Unit

    Sets the list of rows for the fragment.

    open Unit

    Sets an item clicked listener.

    open Unit

    Sets an item selection listener.

    open Unit

    Sets the selected row position with smooth animation.

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

    Sets the selected row position.

    Protected methods
    open Any!

    open View!
    inflateTitle(inflater: LayoutInflater!, parent: ViewGroup!, savedInstanceState: Bundle!)

    open Unit

    open Unit

    open Unit

    open Unit
    onSetDetailsOverviewRowStatus(presenter: FullWidthDetailsOverviewRowPresenter!, viewHolder: FullWidthDetailsOverviewRowPresenter.ViewHolder!, adapterPosition: Int, selectedPosition: Int, selectedSubPosition: Int)

    Called to change DetailsOverviewRow view status when current selected row position or selected sub position changed.

    open Unit
    onSetRowStatus(presenter: RowPresenter!, viewHolder: RowPresenter.ViewHolder!, adapterPosition: Int, selectedPosition: Int, selectedSubPosition: Int)

    Called on every visible row to change view status when current selected row position or selected sub position changed.

    open Unit
    runEntranceTransition(entranceTransition: Any!)

    open Unit

    Called to setup FullWidthDetailsOverviewRowPresenter.

    open Unit
    setupPresenter(rowPresenter: Presenter!)

    Called to setup each Presenter of Adapter passed in setAdapter(ObjectAdapter).

    Inherited functions