belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
Deprecated since version 27.1.0
HeadersFragment
public
class
HeadersFragment
extends Fragment
java.lang.Object | ||
↳ | android.app.Fragment | |
↳ | android.support.v17.leanback.app.HeadersFragment |
This class was deprecated
in API level 27.1.0.
use HeadersSupportFragment
An fragment containing a list of row headers. Implementation must support three types of rows:
DividerRow
rendered byDividerPresenter
.Row
rendered byRowHeaderPresenter
.SectionRow
rendered byRowHeaderPresenter
.
setPresenterSelector(PresenterSelector)
in subclass constructor to customize
Presenters. App may override onCreateHeadersFragment()
.
Summary
Nested classes | |
---|---|
interface |
HeadersFragment.OnHeaderClickedListener
This interface was deprecated
in API level 27.1.0.
use |
interface |
HeadersFragment.OnHeaderViewSelectedListener
This interface was deprecated
in API level 27.1.0.
use |
Inherited constants |
---|
From
interface
android.content.ComponentCallbacks2
|
Public constructors | |
---|---|
HeadersFragment()
|
Public methods | |
---|---|
final
ObjectAdapter
|
getAdapter()
Returns the Adapter that represents list of rows. |
final
ItemBridgeAdapter
|
getBridgeAdapter()
Returns the RecyclerView.Adapter that wraps |
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 | |
---|---|
From
class
android.app.Fragment
| |
From
class
java.lang.Object
| |
From
interface
android.content.ComponentCallbacks2
| |
From
interface
android.view.View.OnCreateContextMenuListener
| |
From
interface
android.content.ComponentCallbacks
|
Public constructors
Public methods
getAdapter
ObjectAdapter getAdapter ()
Returns the Adapter that represents list of rows.
Returns | |
---|---|
ObjectAdapter |
Adapter that represents list of rows. |
getBridgeAdapter
ItemBridgeAdapter getBridgeAdapter ()
Returns the RecyclerView.Adapter that wraps getAdapter()
.
Returns | |
---|---|
ItemBridgeAdapter |
The RecyclerView.Adapter that wraps getAdapter() .
|
getPresenterSelector
PresenterSelector getPresenterSelector ()
Get the presenter selector used to create and bind views.
Returns | |
---|---|
PresenterSelector |
getSelectedPosition
int getSelectedPosition ()
Gets position of currently selected row.
Returns | |
---|---|
int |
Position of currently selected row. |
getVerticalGridView
VerticalGridView getVerticalGridView ()
Returns | |
---|---|
VerticalGridView |
onCreateView
View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Parameters | |
---|---|
inflater |
LayoutInflater |
container |
ViewGroup |
savedInstanceState |
Bundle |
Returns | |
---|---|
View |
onDestroyView
void onDestroyView ()
onViewCreated
void onViewCreated (View view, Bundle savedInstanceState)
Parameters | |
---|---|
view |
View |
savedInstanceState |
Bundle |
setAdapter
void setAdapter (ObjectAdapter rowsAdapter)
Sets the adapter that represents a list of rows.
Parameters | |
---|---|
rowsAdapter |
ObjectAdapter : Adapter that represents list of rows.
|
setAlignment
void setAlignment (int windowAlignOffsetTop)
Parameters | |
---|---|
windowAlignOffsetTop |
int |
setOnHeaderClickedListener
void setOnHeaderClickedListener (HeadersFragment.OnHeaderClickedListener listener)
Parameters | |
---|---|
listener |
HeadersFragment.OnHeaderClickedListener |
setOnHeaderViewSelectedListener
void setOnHeaderViewSelectedListener (HeadersFragment.OnHeaderViewSelectedListener listener)
Parameters | |
---|---|
listener |
HeadersFragment.OnHeaderViewSelectedListener |
setPresenterSelector
void setPresenterSelector (PresenterSelector presenterSelector)
Set the presenter selector used to create and bind views.
Parameters | |
---|---|
presenterSelector |
PresenterSelector |
setSelectedPosition
void setSelectedPosition (int position)
Sets the selected row position with smooth animation.
Parameters | |
---|---|
position |
int |
setSelectedPosition
void setSelectedPosition (int position, boolean smooth)
Sets the selected row position.
Parameters | |
---|---|
position |
int |
smooth |
boolean |
Interfaces
- BrowseFragment.FragmentHost
- BrowseFragment.MainFragmentAdapterProvider
- BrowseFragment.MainFragmentRowsAdapterProvider
- BrowseSupportFragment.FragmentHost
- BrowseSupportFragment.MainFragmentAdapterProvider
- BrowseSupportFragment.MainFragmentRowsAdapterProvider
- HeadersFragment.OnHeaderClickedListener
- HeadersFragment.OnHeaderViewSelectedListener
- HeadersSupportFragment.OnHeaderClickedListener
- HeadersSupportFragment.OnHeaderViewSelectedListener
- SearchFragment.SearchResultProvider
- SearchSupportFragment.SearchResultProvider
Classes
- BackgroundManager
- BaseFragment
- BaseSupportFragment
- BrandedFragment
- BrandedSupportFragment
- BrowseFragment
- BrowseFragment.BrowseTransitionListener
- BrowseFragment.FragmentFactory
- BrowseFragment.ListRowFragmentFactory
- BrowseFragment.MainFragmentAdapter
- BrowseFragment.MainFragmentAdapterRegistry
- BrowseFragment.MainFragmentRowsAdapter
- BrowseSupportFragment
- BrowseSupportFragment.BrowseTransitionListener
- BrowseSupportFragment.FragmentFactory
- BrowseSupportFragment.ListRowFragmentFactory
- BrowseSupportFragment.MainFragmentAdapter
- BrowseSupportFragment.MainFragmentAdapterRegistry
- BrowseSupportFragment.MainFragmentRowsAdapter
- DetailsFragment
- DetailsFragmentBackgroundController
- DetailsSupportFragment
- DetailsSupportFragmentBackgroundController
- ErrorFragment
- ErrorSupportFragment
- GuidedStepFragment
- GuidedStepSupportFragment
- HeadersFragment
- HeadersSupportFragment
- OnboardingFragment
- OnboardingSupportFragment
- PlaybackFragment
- PlaybackFragmentGlueHost
- PlaybackSupportFragment
- PlaybackSupportFragmentGlueHost
- ProgressBarManager
- RowsFragment
- RowsFragment.MainFragmentAdapter
- RowsFragment.MainFragmentRowsAdapter
- RowsSupportFragment
- RowsSupportFragment.MainFragmentAdapter
- RowsSupportFragment.MainFragmentRowsAdapter
- SearchFragment
- SearchSupportFragment
- VerticalGridFragment
- VerticalGridSupportFragment
- VideoFragment
- VideoFragmentGlueHost
- VideoSupportFragment
- VideoSupportFragmentGlueHost
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.