GuidanceStylist
open class GuidanceStylist : FragmentAnimationProvider
kotlin.Any | |
↳ | androidx.leanback.widget.GuidanceStylist |
GuidanceStylist is used within a androidx.leanback.app.GuidedStepFragment
to display contextual information for the decision(s) required at that step.
Many aspects of the base GuidanceStylist can be customized through theming; see the theme attributes below. Note that these attributes are not set on individual elements in layout XML, but instead would be set in a custom theme. See Styles and Themes for more information.
If these hooks are insufficient, this class may also be subclassed. Subclasses may wish to override the onProvideLayoutId
method to change the layout file used to display the guidance; more complex layouts may be supported by also providing a subclass of GuidanceStylist.Guidance
with extra fields.
Note: If an alternate layout is provided, the following view IDs should be used to refer to base elements:
androidx.leanback.R.id#guidance_title
androidx.leanback.R.id#guidance_description
androidx.leanback.R.id#guidance_breadcrumb
androidx.leanback.R.id#guidance_icon
View IDs are allowed to be missing, in which case the corresponding views will be null. androidx.leanback.R.attr#guidedStepImeAppearingAnimation
androidx.leanback.R.attr#guidedStepImeDisappearingAnimation
androidx.leanback.R.attr#guidanceContainerStyle
androidx.leanback.R.attr#guidanceTitleStyle
androidx.leanback.R.attr#guidanceDescriptionStyle
androidx.leanback.R.attr#guidanceBreadcrumbStyle
androidx.leanback.R.attr#guidanceIconStyle
Summary
Nested classes | |
---|---|
open |
A data class representing contextual information for a . |
Public constructors | |
---|---|
<init>() GuidanceStylist is used within a |
Public methods | |
---|---|
open TextView! |
Returns the view displaying the breadcrumb of the guidance. |
open TextView! |
Returns the view displaying the description of the guidance. |
open ImageView! |
Returns the view displaying the icon of the guidance. |
open TextView! |
Returns the view displaying the title of the guidance. |
open View! |
onCreateView(inflater: LayoutInflater!, container: ViewGroup!, guidance: GuidanceStylist.Guidance!) Creates an appropriately configured view for the given Guidance, using the provided inflater and container. |
open Unit |
Called when destroy the View created by GuidanceStylist. |
open Unit |
onImeAppearing(@NonNull animators: MutableList<Animator!>) Animates the fragment in response to the IME appearing. |
open Unit |
onImeDisappearing(@NonNull animators: MutableList<Animator!>) Animates the fragment in response to the IME disappearing. |
open Int |
Provides the resource ID of the layout defining the guidance view. |
Public constructors
<init>
GuidanceStylist()
GuidanceStylist is used within a androidx.leanback.app.GuidedStepFragment
to display contextual information for the decision(s) required at that step.
Many aspects of the base GuidanceStylist can be customized through theming; see the theme attributes below. Note that these attributes are not set on individual elements in layout XML, but instead would be set in a custom theme. See Styles and Themes for more information.
If these hooks are insufficient, this class may also be subclassed. Subclasses may wish to override the onProvideLayoutId
method to change the layout file used to display the guidance; more complex layouts may be supported by also providing a subclass of GuidanceStylist.Guidance
with extra fields.
Note: If an alternate layout is provided, the following view IDs should be used to refer to base elements:
androidx.leanback.R.id#guidance_title
androidx.leanback.R.id#guidance_description
androidx.leanback.R.id#guidance_breadcrumb
androidx.leanback.R.id#guidance_icon
View IDs are allowed to be missing, in which case the corresponding views will be null. androidx.leanback.R.attr#guidedStepImeAppearingAnimation
androidx.leanback.R.attr#guidedStepImeDisappearingAnimation
androidx.leanback.R.attr#guidanceContainerStyle
androidx.leanback.R.attr#guidanceTitleStyle
androidx.leanback.R.attr#guidanceDescriptionStyle
androidx.leanback.R.attr#guidanceBreadcrumbStyle
androidx.leanback.R.attr#guidanceIconStyle
Public methods
getBreadcrumbView
open fun getBreadcrumbView(): TextView!
Returns the view displaying the breadcrumb of the guidance.
Return | |
---|---|
TextView! |
The text view object for the breadcrumb. |
getDescriptionView
open fun getDescriptionView(): TextView!
Returns the view displaying the description of the guidance.
Return | |
---|---|
TextView! |
The text view object for the description. |
getIconView
open fun getIconView(): ImageView!
Returns the view displaying the icon of the guidance.
Return | |
---|---|
ImageView! |
The image view object for the icon. |
getTitleView
open fun getTitleView(): TextView!
Returns the view displaying the title of the guidance.
Return | |
---|---|
TextView! |
The text view object for the title. |
onCreateView
open fun onCreateView(
inflater: LayoutInflater!,
container: ViewGroup!,
guidance: GuidanceStylist.Guidance!
): View!