public class HeadersFragment
extends Fragment

   ↳ android.app.Fragment
     ↳ androidx.leanback.app.HeadersFragment

This class is deprecated.
use HeadersSupportFragment

An fragment containing a list of row headers. Implementation must support three types of rows:

Use setPresenterSelector(PresenterSelector) in subclass constructor to customize Presenters. App may override BrowseFragment.onCreateHeadersFragment().


Nested classes

interface HeadersFragment.OnHeaderClickedListener

This interface is deprecated. use HeadersSupportFragment  

interface HeadersFragment.OnHeaderViewSelectedListener

This interface is deprecated. use HeadersSupportFragment  

Inherited constants

Public constructors


Public methods

final ObjectAdapter getAdapter()

Returns the Adapter that represents list of rows.

final ItemBridgeAdapter getBridgeAdapter()

Returns the RecyclerView.Adapter that wraps getAdapter().

final PresenterSelector getPresenterSelector()

Get the presenter selector used to create and bind views.

int getSelectedPosition()

Gets position of currently selected row.

final VerticalGridView getVerticalGridView()
boolean isScrolling()
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void onDestroyView()
void onSaveInstanceState(Bundle outState)
void onTransitionEnd()
boolean onTransitionPrepare()
void onTransitionStart()
void onViewCreated(View view, Bundle savedInstanceState)
final void setAdapter(ObjectAdapter rowsAdapter)

Sets the adapter that represents a list of rows.

void setAlignment(int windowAlignOffsetTop)
void setOnHeaderClickedListener(HeadersFragment.OnHeaderClickedListener listener)
void setOnHeaderViewSelectedListener(HeadersFragment.OnHeaderViewSelectedListener listener)
final void setPresenterSelector(PresenterSelector presenterSelector)

Set the presenter selector used to create and bind views.

void setSelectedPosition(int position)

Sets the selected row position with smooth animation.

void setSelectedPosition(int position, boolean smooth)

Sets the selected row position.

Inherited methods