belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
BaseSupportFragment
public
class
BaseSupportFragment
extends BrandedSupportFragment
java.lang.Object | |||
↳ | android.support.v4.app.Fragment | ||
↳ | android.support.v17.leanback.app.BrandedSupportFragment | ||
↳ | android.support.v17.leanback.app.BaseSupportFragment |
Known Direct Subclasses |
Base class for leanback Fragments. This class is not intended to be subclassed by apps.
Summary
Public methods | |
---|---|
final
ProgressBarManager
|
getProgressBarManager()
Returns the |
void
|
onCreate(Bundle savedInstanceState)
Called to do initial creation of a fragment. |
void
|
onViewCreated(View view, Bundle savedInstanceState)
Called immediately after |
void
|
prepareEntranceTransition()
Enables entrance transition. |
void
|
startEntranceTransition()
When fragment finishes loading data, it should call startEntranceTransition() to execute the entrance transition. |
Protected methods | |
---|---|
Object
|
createEntranceTransition()
Create entrance transition. |
void
|
onEntranceTransitionEnd()
Callback when entrance transition is ended. |
void
|
onEntranceTransitionPrepare()
Callback when entrance transition is prepared. |
void
|
onEntranceTransitionStart()
Callback when entrance transition is started. |
void
|
runEntranceTransition(Object entranceTransition)
Run entrance transition. |
Inherited methods | |
---|---|
From
class
android.support.v17.leanback.app.BrandedSupportFragment
| |
From
class
android.support.v4.app.Fragment
| |
From
class
java.lang.Object
| |
From
interface
android.content.ComponentCallbacks
| |
From
interface
android.view.View.OnCreateContextMenuListener
| |
From
interface
android.arch.lifecycle.LifecycleOwner
| |
From
interface
android.arch.lifecycle.ViewModelStoreOwner
|
Public methods
getProgressBarManager
ProgressBarManager getProgressBarManager ()
Returns the ProgressBarManager
.
Returns | |
---|---|
ProgressBarManager |
The ProgressBarManager .
|
onCreate
void onCreate (Bundle savedInstanceState)
Called to do initial creation of a fragment. This is called after
onAttach(Activity)
and before
onCreateView(LayoutInflater, ViewGroup, Bundle)
.
Note that this can be called while the fragment's activity is
still in the process of being created. As such, you can not rely
on things like the activity's content view hierarchy being initialized
at this point. If you want to do work once the activity itself is
created, see onActivityCreated(Bundle)
.
Any restored child fragments will be created before the base
Fragment.onCreate
method returns.
Parameters | |
---|---|
savedInstanceState |
Bundle : If the fragment is being re-created from
a previous saved state, this is the state.
|
onViewCreated
void onViewCreated (View view, Bundle savedInstanceState)
Called immediately after onCreateView(LayoutInflater, ViewGroup, Bundle)
has returned, but before any saved state has been restored in to the view.
This gives subclasses a chance to initialize themselves once
they know their view hierarchy has been completely created. The fragment's
view hierarchy is not however attached to its parent at this point.
Parameters | |
---|---|
view |
View : The View returned by onCreateView(LayoutInflater, ViewGroup, Bundle) . |
savedInstanceState |
Bundle : If non-null, this fragment is being re-constructed
from a previous saved state as given here.
|
prepareEntranceTransition
void prepareEntranceTransition ()
Enables entrance transition.
Entrance transition is the standard slide-in transition that shows rows of data in browse screen and details screen.
The method is ignored before LOLLIPOP (API21).
This method must be called in or
before onCreate(). Typically entrance transition should be enabled when savedInstance is
null so that fragment restored from instanceState does not run an extra entrance transition.
When the entrance transition is enabled, the fragment will make headers and content
hidden initially.
When data of rows are ready, app must call startEntranceTransition()
to kick off
the transition, otherwise the rows will be invisible forever.
It is similar to android:windowsEnterTransition and can be considered a late-executed android:windowsEnterTransition controlled by app. There are two reasons that app needs it:
Transition object is returned by createEntranceTransition(). Typically the app does not need override the default transition that browse and details provides.
startEntranceTransition
void startEntranceTransition ()
When fragment finishes loading data, it should call startEntranceTransition() to execute the entrance transition. startEntranceTransition() will start transition only if both two conditions are satisfied:
If startEntranceTransition() is called before onViewCreated(), it will be pending and executed when view is created.
Protected methods
createEntranceTransition
Object createEntranceTransition ()
Create entrance transition. Subclass can override to load transition from resource or construct manually. Typically app does not need to override the default transition that browse and details provides.
Returns | |
---|---|
Object |
onEntranceTransitionEnd
void onEntranceTransitionEnd ()
Callback when entrance transition is ended.
onEntranceTransitionPrepare
void onEntranceTransitionPrepare ()
Callback when entrance transition is prepared. This is when fragment should stop user input and animations.
onEntranceTransitionStart
void onEntranceTransitionStart ()
Callback when entrance transition is started. This is when fragment should stop processing layout.
runEntranceTransition
void runEntranceTransition (Object entranceTransition)
Run entrance transition. Subclass may use TransitionManager to perform go(Scene) or beginDelayedTransition(). App should not override the default implementation of browse and details fragment.
Parameters | |
---|---|
entranceTransition |
Object |
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