belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
Deprecated since version 27.1.0
BrowseFragment.MainFragmentAdapter
public
static
class
BrowseFragment.MainFragmentAdapter
extends Object
java.lang.Object | |
↳ | android.support.v17.leanback.app.BrowseFragment.MainFragmentAdapter<T extends android.app.Fragment> |
Known Direct Subclasses |
This class was deprecated
in API level 27.1.0.
use BrowseSupportFragment
Interface that defines the interaction between BrowseFragment
and its main
content fragment. The key method is getFragment()
,
it will be used to get the fragment to be shown in the content section. Clients can
provide any implementation of fragment and customize its interaction with
BrowseFragment
by overriding the necessary methods.
Clients are expected to provide
an instance of BrowseFragment.MainFragmentAdapterRegistry
which will be responsible for providing
implementations of BrowseFragment.MainFragmentAdapter
for given content types. Currently
we support different types of content - ListRow
, PageRow
or any subtype
of Row
. We provide an out of the box adapter implementation for any rows other than
PageRow
- RowsFragment.MainFragmentAdapter
.
PageRow
is intended to give full flexibility to developers in terms of Fragment
design. Users will have to provide an implementation of BrowseFragment.MainFragmentAdapter
and provide that through BrowseFragment.MainFragmentAdapterRegistry
.
BrowseFragment.MainFragmentAdapter
implementation can supply any fragment and override
just those interactions that makes sense.
Summary
Public constructors | |
---|---|
BrowseFragment.MainFragmentAdapter(T fragment)
|
Public methods | |
---|---|
final
T
|
getFragment()
|
final
BrowseFragment.FragmentHost
|
getFragmentHost()
Returns the current host interface so that main fragment can interact with
|
boolean
|
isScalingEnabled()
Returns whether row scaling is enabled. |
boolean
|
isScrolling()
Returns whether its scrolling. |
void
|
onTransitionEnd()
Callback indicating transition end. |
boolean
|
onTransitionPrepare()
Callback indicating transition prepare start. |
void
|
onTransitionStart()
Callback indicating transition start. |
void
|
setAlignment(int windowAlignOffsetFromTop)
Sets the window alignment and also the pivots for scale operation. |
void
|
setEntranceTransitionState(boolean state)
For rows that willing to participate entrance transition, this function hide views if afterTransition is true, show views if afterTransition is false. |
void
|
setExpand(boolean expand)
Set the visibility of titles/hover card of browse rows. |
void
|
setScalingEnabled(boolean scalingEnabled)
Sets the row scaling property. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
BrowseFragment.MainFragmentAdapter
BrowseFragment.MainFragmentAdapter (T fragment)
Parameters | |
---|---|
fragment |
T |
Public methods
getFragmentHost
BrowseFragment.FragmentHost getFragmentHost ()
Returns the current host interface so that main fragment can interact with
BrowseFragment
.
Returns | |
---|---|
BrowseFragment.FragmentHost |
isScalingEnabled
boolean isScalingEnabled ()
Returns whether row scaling is enabled.
Returns | |
---|---|
boolean |
isScrolling
boolean isScrolling ()
Returns whether its scrolling.
Returns | |
---|---|
boolean |
onTransitionPrepare
boolean onTransitionPrepare ()
Callback indicating transition prepare start.
Returns | |
---|---|
boolean |
onTransitionStart
void onTransitionStart ()
Callback indicating transition start.
setAlignment
void setAlignment (int windowAlignOffsetFromTop)
Sets the window alignment and also the pivots for scale operation.
Parameters | |
---|---|
windowAlignOffsetFromTop |
int |
setEntranceTransitionState
void setEntranceTransitionState (boolean state)
For rows that willing to participate entrance transition, this function hide views if afterTransition is true, show views if afterTransition is false.
Parameters | |
---|---|
state |
boolean |
setExpand
void setExpand (boolean expand)
Set the visibility of titles/hover card of browse rows.
Parameters | |
---|---|
expand |
boolean |
setScalingEnabled
void setScalingEnabled (boolean scalingEnabled)
Sets the row scaling property.
Parameters | |
---|---|
scalingEnabled |
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