Android APIs
public class

GuidanceStylist

extends Object
implements FragmentAnimationProvider
java.lang.Object
   ↳ android.support.v17.leanback.widget.GuidanceStylist

Class Overview

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.

Summary

Nested Classes
class GuidanceStylist.Guidance A data class representing contextual information for a GuidedStepFragment
XML Attributes
Attribute Name Related Method Description
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:guidanceEntryAnimation Theme attribute for the animation used when the guidance is animated in at activity start. 
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:guidedStepEntryAnimation Theme attribute for the animation used when a guided step element is animated in on fragment stack push. 
android.support.v17.leanback:guidedStepExitAnimation Theme attribute for the animation used when a guided step element is animated out on fragment stack push. 
android.support.v17.leanback:guidedStepReentryAnimation Theme attribute for the animation used when a guided step element is animated in on fragment stack pop. 
android.support.v17.leanback:guidedStepReturnAnimation Theme attribute for the animation used when a guided step element is animated out on fragment stack pop. 
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.
void onActivityEnter(List<Animator> animators)
Animates the entry of the fragment in the case where the activity is first being presented.
void onActivityExit(List<Animator> animators)
Animates the exit of the fragment in the case where the activity is about to pause.
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 onFragmentEnter(List<Animator> animators)
Animates the entry of the fragment in the case where there is a previous step fragment participating in the animation.
void onFragmentExit(List<Animator> animators)
Animates the exit of the fragment in the case where there is a previous step fragment participating in the animation.
void onFragmentReenter(List<Animator> animators)
Animates the re-entry of the fragment in the case where there is a previous step fragment participating in the animation.
void onFragmentReturn(List<Animator> animators)
Animates the return of the fragment in the case where there is a previous step fragment participating in the animation.
int onProvideLayoutId()
Provides the resource ID of the layout defining the guidance view.
[Expand]
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.

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidanceContainerStyle

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

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidanceDescriptionStyle

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

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidanceEntryAnimation

Theme attribute for the animation used when the guidance is animated in at activity start. Default is lb_guidance_entry.

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidanceIconStyle

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

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidanceTitleStyle

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

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidedStepEntryAnimation

Theme attribute for the animation used when a guided step element is animated in on fragment stack push. Default is lb_guidedstep_slide_in_from_end.

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidedStepExitAnimation

Theme attribute for the animation used when a guided step element is animated out on fragment stack push. Default is lb_guidedstep_slide_out_to_start.

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidedStepReentryAnimation

Theme attribute for the animation used when a guided step element is animated in on fragment stack pop. Default is lb_guidedstep_slide_in_from_start.

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

This is a private symbol.

Related Methods

android.support.v17.leanback:guidedStepReturnAnimation

Theme attribute for the animation used when a guided step element is animated out on fragment stack pop. Default is lb_guidedstep_slide_out_to_end.

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

This is a private symbol.

Related Methods

Public Constructors

public GuidanceStylist ()

Public Methods

public TextView getBreadcrumbView ()

Returns the view displaying the breadcrumb of the guidance.

Returns
  • The text view object for the breadcrumb.

public TextView getDescriptionView ()

Returns the view displaying the description of the guidance.

Returns
  • The text view object for the description.

public ImageView getIconView ()

Returns the view displaying the icon of the guidance.

Returns
  • The image view object for the icon.

public TextView getTitleView ()

Returns the view displaying the title of the guidance.

Returns
  • The text view object for the title.

public void onActivityEnter (List<Animator> animators)

Animates the entry of the fragment in the case where the activity is first being presented.

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

public void onActivityExit (List<Animator> animators)

Animates the exit of the fragment in the case where the activity is about to pause.

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

public 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 The layout inflater to be used when constructing the view.
container The view group to be passed in the call to LayoutInflater.inflate.
guidance The guidance data for the view.
Returns
  • The view to be added to the caller's view hierarchy.

public void onFragmentEnter (List<Animator> animators)

Animates the entry of the fragment in the case where there is a previous step fragment participating in the animation. Entry occurs when the fragment is preparing to be shown as it is pushed onto the back stack.

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

public void onFragmentExit (List<Animator> animators)

Animates the exit of the fragment in the case where there is a previous step fragment participating in the animation. Exit occurs when the fragment is preparing to be removed, hidden, or detached due to pushing another fragment onto the back stack.

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

public void onFragmentReenter (List<Animator> animators)

Animates the re-entry of the fragment in the case where there is a previous step fragment participating in the animation. Re-entry occurs when the fragment is preparing to be shown due to popping the back stack.

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

public void onFragmentReturn (List<Animator> animators)

Animates the return of the fragment in the case where there is a previous step fragment participating in the animation. Return occurs when the fragment is preparing to be removed, hidden, or detached due to popping the back stack.

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

public 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
  • The resource ID of the layout to be inflated to define the guidance view.