Skip to content

Most visited

Recently visited

navigation

GuidanceStylist

public class GuidanceStylist
extends Object implements FragmentAnimationProvider

java.lang.Object
   ↳ android.support.v17.leanback.widget.GuidanceStylist


GuidanceStylist is used within a 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:

View IDs are allowed to be missing, in which case the corresponding views will be null.

See also:

Summary

Nested classes

class GuidanceStylist.Guidance

A data class representing contextual information for a GuidedStepFragment

XML attributes

android.support.v17.leanback:guidanceBreadcrumbStyle Theme attribute for the style of the breadcrumb in a GuidanceStylist. 
android.support.v17.leanback:guidanceContainerStyle Theme attribute for the style of the main container in a GuidanceStylist. 
android.support.v17.leanback:guidanceDescriptionStyle Theme attribute for the style of the description in a GuidanceStylist. 
android.support.v17.leanback:guidanceIconStyle Theme attribute for the style of the icon in a GuidanceStylist. 
android.support.v17.leanback:guidanceTitleStyle Theme attribute for the style of the title in a GuidanceStylist. 
android.support.v17.leanback:guidedStepImeAppearingAnimation Theme attribute for the animation used when a guided step element is animated in response to the IME appearing. 
android.support.v17.leanback:guidedStepImeDisappearingAnimation Theme attribute for the animation used when a guided step element is animated in response to the IME disappearing. 

Public constructors

GuidanceStylist()

Public methods

TextView getBreadcrumbView()

Returns the view displaying the breadcrumb of the guidance.

TextView getDescriptionView()

Returns the view displaying the description of the guidance.

ImageView getIconView()

Returns the view displaying the icon of the guidance.

TextView getTitleView()

Returns the view displaying the title of the guidance.

View onCreateView(LayoutInflater inflater, ViewGroup container, GuidanceStylist.Guidance guidance)

Creates an appropriately configured view for the given Guidance, using the provided inflater and container.

void onDestroyView()

Called when destroy the View created by GuidanceStylist.

void onImeAppearing(List<Animator> animators)

Animates the fragment in response to the IME appearing.

void onImeDisappearing(List<Animator> animators)

Animates the fragment in response to the IME disappearing.

int onProvideLayoutId()

Provides the resource ID of the layout defining the guidance view.

Inherited methods

From class java.lang.Object
From interface android.support.v17.leanback.widget.FragmentAnimationProvider

XML attributes

android.support.v17.leanback:guidanceBreadcrumbStyle

Theme attribute for the style of the breadcrumb in a GuidanceStylist. Default is Widget_Leanback_GuidanceBreadcrumbStyle.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

android.support.v17.leanback:guidanceContainerStyle

Theme attribute for the style of the main container in a GuidanceStylist. Default is Widget_Leanback_GuidanceContainerStyle.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

android.support.v17.leanback:guidanceDescriptionStyle

Theme attribute for the style of the description in a GuidanceStylist. Default is Widget_Leanback_GuidanceDescriptionStyle.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

android.support.v17.leanback:guidanceIconStyle

Theme attribute for the style of the icon in a GuidanceStylist. Default is Widget_Leanback_GuidanceIconStyle.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

android.support.v17.leanback:guidanceTitleStyle

Theme attribute for the style of the title in a GuidanceStylist. Default is Widget_Leanback_GuidanceTitleStyle.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

android.support.v17.leanback:guidedStepImeAppearingAnimation

Theme attribute for the animation used when a guided step element is animated in response to the IME appearing. Default is lb_guidedstep_slide_up.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

android.support.v17.leanback:guidedStepImeDisappearingAnimation

Theme attribute for the animation used when a guided step element is animated in response to the IME disappearing. Default is lb_guidedstep_slide_down.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

Public constructors

GuidanceStylist

added in version 22.1.0
GuidanceStylist ()

Public methods

getBreadcrumbView

added in version 22.1.0
TextView getBreadcrumbView ()

Returns the view displaying the breadcrumb of the guidance.

Returns
TextView The text view object for the breadcrumb.

getDescriptionView

added in version 22.1.0
TextView getDescriptionView ()

Returns the view displaying the description of the guidance.

Returns
TextView The text view object for the description.

getIconView

added in version 22.1.0
ImageView getIconView ()

Returns the view displaying the icon of the guidance.

Returns
ImageView The image view object for the icon.

getTitleView

added in version 22.1.0
TextView getTitleView ()

Returns the view displaying the title of the guidance.

Returns
TextView The text view object for the title.

onCreateView

added in version 22.1.0
View onCreateView (LayoutInflater inflater, 
                ViewGroup container, 
                GuidanceStylist.Guidance guidance)

Creates an appropriately configured view for the given Guidance, using the provided inflater and container.

Note: Does not actually add the created view to the container; the caller should do this.

Parameters
inflater LayoutInflater: The layout inflater to be used when constructing the view.
container ViewGroup: The view group to be passed in the call to LayoutInflater.inflate.
guidance GuidanceStylist.Guidance: The guidance data for the view.
Returns
View The view to be added to the caller's view hierarchy.

onDestroyView

added in version 23.2.0
void onDestroyView ()

Called when destroy the View created by GuidanceStylist.

onImeAppearing

added in version 23.1.0
void onImeAppearing (List<Animator> animators)

Animates the fragment in response to the IME appearing.

Parameters
animators List: A list of animations to which this provider's animations should be added.

onImeDisappearing

added in version 23.1.0
void onImeDisappearing (List<Animator> animators)

Animates the fragment in response to the IME disappearing.

Parameters
animators List: A list of animations to which this provider's animations should be added.

onProvideLayoutId

added in version 22.1.0
int onProvideLayoutId ()

Provides the resource ID of the layout defining the guidance view. Subclasses may override to provide their own customized layouts. The base implementation returns lb_guidance. If overridden, the substituted layout should contain matching IDs for any views that should be managed by the base class; this can be achieved by starting with a copy of the base layout file.

Returns
int The resource ID of the layout to be inflated to define the guidance view.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.