BaseFragment
class BaseFragment : BrandedFragment
| kotlin.Any | |||
| ↳ | android.app.Fragment | ||
| ↳ | androidx.leanback.app.BrandedFragment | ||
| ↳ | androidx.leanback.app.BaseFragment |
BrowseFragment |
This class is deprecated. |
DetailsFragment |
This class is deprecated. |
VerticalGridFragment |
This class is deprecated. |
Base class for leanback Fragments. This class is not intended to be subclassed by apps.
Summary
Public functions |
|
|---|---|
ProgressBarManager! |
Returns the |
Unit |
This function is deprecated. |
Unit |
This function is deprecated. |
Unit |
This function is deprecated. |
Unit |
Enables entrance transition. |
Unit |
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: |
Protected functions |
|
|---|---|
Any! |
Create entrance transition. |
Unit |
Callback when entrance transition is ended. |
Unit |
Callback when entrance transition is prepared. |
Unit |
Callback when entrance transition is started. |
Unit |
Run entrance transition. |
Inherited Constants |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited functions |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public functions
fungetProgressBarManager(): ProgressBarManager!
Returns the ProgressBarManager.
| Returns | |
|---|---|
ProgressBarManager! |
The |
funprepareEntranceTransition(): Unit
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:
- Workaround the problem that activity transition is not available between launcher and app. Browse activity must programmatically start the slide-in transition.
- Separates DetailsOverviewRow transition from other rows transition. So that the DetailsOverviewRow transition can be executed earlier without waiting for all rows to be loaded.
Transition object is returned by createEntranceTransition(). Typically the app does not need override the default transition that browse and details provides.
funstartEntranceTransition(): Unit
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:
- prepareEntranceTransition() was called.
- has not executed entrance transition yet.
If startEntranceTransition() is called before onViewCreated(), it will be pending and executed when view is created.
Protected functions
protected funcreateEntranceTransition(): Any!
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.
protected funonEntranceTransitionPrepare(): Unit
Callback when entrance transition is prepared. This is when fragment should stop user input and animations.
protected funonEntranceTransitionStart(): Unit
Callback when entrance transition is started. This is when fragment should stop processing layout.
protected funrunEntranceTransition(entranceTransition: Any!): Unit
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.