java.lang.Object | |
↳ | android.support.v17.leanback.widget.GuidedActionsStylist |
GuidedActionsStylist is used within a GuidedStepFragment
to supply the right-side panel where users can take actions. It consists of a container for the
list of actions, and a stationary selector view that indicates visually the location of focus.
Many aspects of the base GuidedActionsStylist 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 used to display the
list container and selector, or the onProvideItemLayoutId()
method to change the layout
used to display each action.
Note: If an alternate list layout is provided, the following view IDs must be supplied:
These view IDs must be present in order for the stylist to function. The list ID must correspond
to a VerticalGridView
or subclass.
If an alternate item layout is provided, the following view IDs should be used to refer to base elements:
guidedactions_item_content
guidedactions_item_title
guidedactions_item_description
guidedactions_item_icon
guidedactions_item_checkmark
guidedactions_item_chevron
These view IDs are allowed to be missing, in which case the corresponding views in GuidedActionsStylist.ViewHolder
will be null.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GuidedActionsStylist.ViewHolder | ViewHolder caches information about the action item layouts' subviews. |
XML Attributes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
android.support.v17.leanback:guidedActionCheckedAnimation | Theme attribute for the animation used in a GuidedActionsPresenter when an action is checked. | ||||||||||
android.support.v17.leanback:guidedActionContentWidth | Theme attribute used in a GuidedActionsPresenter for the width of the text area of a single action when there is an icon present. | ||||||||||
android.support.v17.leanback:guidedActionContentWidthNoIcon | Theme attribute used in a GuidedActionsPresenter for the width of the text area of a single action when there is no icon present. | ||||||||||
android.support.v17.leanback:guidedActionDescriptionMinLines | Theme attribute used in a GuidedActionsPresenter for the max lines of the title text view when the action's isMultilineDescription is set to false. | ||||||||||
android.support.v17.leanback:guidedActionDisabledChevronAlpha | Theme attribute used in a GuidedActionsPresenter for the alpha value of the chevron decoration when its action is disabled. | ||||||||||
android.support.v17.leanback:guidedActionEnabledChevronAlpha | Theme attribute used in a GuidedActionsPresenter for the alpha value of the chevron decoration when its action is enabled. | ||||||||||
android.support.v17.leanback:guidedActionItemCheckmarkStyle | Theme attribute for the style of an action's checkmark in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionItemChevronStyle | Theme attribute for the style of an action's chevron decoration in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionItemContainerStyle | Theme attribute for the style of the container of a single action in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionItemContentStyle | Theme attribute for the style of an action's content in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionItemDescriptionStyle | Theme attribute for the style of an action's description in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionItemIconStyle | Theme attribute for the style of an action's icon in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionItemTitleStyle | Theme attribute for the style of an action's title in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionPressedAnimation | Theme attribute for the animation used in a GuidedActionsPresenter when an action is pressed. | ||||||||||
android.support.v17.leanback:guidedActionTitleMaxLines | Theme attribute used in a GuidedActionsPresenter for the max lines of the title text view when the action's isMultilineDescription is set to true. | ||||||||||
android.support.v17.leanback:guidedActionTitleMinLines | Theme attribute used in a GuidedActionsPresenter for the max lines of the title text view when the action's isMultilineDescription is set to false. | ||||||||||
android.support.v17.leanback:guidedActionUncheckedAnimation | Theme attribute for the animation used in a GuidedActionsPresenter when an action is unchecked. | ||||||||||
android.support.v17.leanback:guidedActionUnpressedAnimation | Theme attribute for the animation used in a GuidedActionsPresenter when an action is unpressed. | ||||||||||
android.support.v17.leanback:guidedActionVerticalPadding | Theme attribute used in a GuidedActionsPresenter for the vertical padding between action views in the list. | ||||||||||
android.support.v17.leanback:guidedActionsContainerStyle | Theme attribute for the style of the container in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionsEntryAnimation | Theme attribute for the animation used in a GuidedActionsPresenter when the actions list is animated in at activity start. | ||||||||||
android.support.v17.leanback:guidedActionsListStyle | Theme attribute for the style of the list in a GuidedActionsPresenter. | ||||||||||
android.support.v17.leanback:guidedActionsSelectorHideAnimation | Theme attribute for the animation used in a GuidedActionsPresenter when the action selector is animated in at activity start. | ||||||||||
android.support.v17.leanback:guidedActionsSelectorShowAnimation | Theme attribute for the animation used in a GuidedActionsPresenter when the action selector is animated in at activity start. | ||||||||||
android.support.v17.leanback:guidedActionsSelectorStyle | Theme attribute for the style of the item selector in a GuidedActionsPresenter. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
mActionsGridView | |||||||||||
mMainView | |||||||||||
mSelectorView |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the VerticalGridView that displays the list of GuidedActions.
| |||||||||||
Animates the entry of the fragment in the case where the activity is first being presented.
| |||||||||||
Animates the exit of the fragment in the case where the activity is about to pause.
| |||||||||||
Animates the view holder's view (or subviews thereof) when the action has had its check
state changed.
| |||||||||||
Animates the view holder's view (or subviews thereof) when the action has had its focus
state changed.
| |||||||||||
Animates the view holder's view (or subviews thereof) when the action has had its press
state changed.
| |||||||||||
Binds a
GuidedActionsStylist.ViewHolder to a particular GuidedAction .
| |||||||||||
Creates a view appropriate for displaying a list of GuidedActions, using the provided
inflater and container.
| |||||||||||
Constructs a
GuidedActionsStylist.ViewHolder capable of representing GuidedAction s.
| |||||||||||
Animates the entry of the fragment in the case where there is a previous step fragment
participating in the animation.
| |||||||||||
Animates the exit of the fragment in the case where there is a previous step fragment
participating in the animation.
| |||||||||||
Animates the re-entry of the fragment in the case where there is a previous step fragment
participating in the animation.
| |||||||||||
Animates the return of the fragment in the case where there is a previous step fragment
participating in the animation.
| |||||||||||
Provides the resource ID of the layout defining the view for an individual guided actions.
| |||||||||||
Provides the resource ID of the layout defining the host view for the list of guided actions.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.support.v17.leanback.widget.FragmentAnimationProvider
|
Theme attribute for the animation used in a GuidedActionsPresenter when an action
is checked. Default is lb_guidedactions_item_checked
.
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.
Theme attribute used in a GuidedActionsPresenter for the width of the text area of
a single action when there is an icon present. Default is lb_guidedactions_item_text_width
.
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.
Theme attribute used in a GuidedActionsPresenter for the width of the text area of
a single action when there is no icon present. Default is lb_guidedactions_item_text_width_no_icon
.
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.
Theme attribute used in a GuidedActionsPresenter for the max lines of the title text
view when the action's isMultilineDescription is set to false. Default is lb_guidedactions_item_description_min_lines
.
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.
Theme attribute used in a GuidedActionsPresenter for the alpha value of the chevron
decoration when its action is disabled. Default is lb_guidedactions_item_disabled_chevron_alpha
.
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.
Theme attribute used in a GuidedActionsPresenter for the alpha value of the chevron
decoration when its action is enabled. Default is lb_guidedactions_item_enabled_chevron_alpha
.
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.
Theme attribute for the style of an action's checkmark in a GuidedActionsPresenter.
Default is Widget_Leanback_GuidedActionItemCheckmarkStyle
.
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.
Theme attribute for the style of an action's chevron decoration in a
GuidedActionsPresenter. Default is Widget_Leanback_GuidedActionItemChevronStyle
.
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.
Theme attribute for the style of the container of a single action in a
GuidedActionsPresenter. Default is Widget_Leanback_GuidedActionItemContainerStyle
.
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.
Theme attribute for the style of an action's content in a GuidedActionsPresenter.
Default is Widget_Leanback_GuidedActionItemContentStyle
.
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.
Theme attribute for the style of an action's description in a GuidedActionsPresenter.
Default is Widget_Leanback_GuidedActionItemDescriptionStyle
.
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.
Theme attribute for the style of an action's icon in a GuidedActionsPresenter. Default
is Widget_Leanback_GuidedActionItemIconStyle
.
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.
Theme attribute for the style of an action's title in a GuidedActionsPresenter. Default
is Widget_Leanback_GuidedActionItemTitleStyle
.
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.
Theme attribute for the animation used in a GuidedActionsPresenter when an action
is pressed. Default is lb_guidedactions_item_pressed
.
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.
Theme attribute used in a GuidedActionsPresenter for the max lines of the title text
view when the action's isMultilineDescription is set to true. Default is lb_guidedactions_item_title_max_lines
.
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.
Theme attribute used in a GuidedActionsPresenter for the max lines of the title text
view when the action's isMultilineDescription is set to false. Default is lb_guidedactions_item_title_min_lines
.
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.
Theme attribute for the animation used in a GuidedActionsPresenter when an action
is unchecked. Default is lb_guidedactions_item_unchecked
.
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.
Theme attribute for the animation used in a GuidedActionsPresenter when an action
is unpressed. Default is lb_guidedactions_item_unpressed
.
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.
Theme attribute used in a GuidedActionsPresenter for the vertical padding between
action views in the list. Default is lb_guidedactions_vertical_padding
.
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.
Theme attribute for the style of the container in a GuidedActionsPresenter. Default is
Widget_Leanback_GuidedActionsContainerStyle
.
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.
Theme attribute for the animation used in a GuidedActionsPresenter when the actions
list is animated in at activity start. Default is lb_guidedactions_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.
Theme attribute for the style of the list in a GuidedActionsPresenter. Default is
Widget_Leanback_GuidedActionsListStyle
.
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.
Theme attribute for the animation used in a GuidedActionsPresenter when the action
selector is animated in at activity start. Default is lb_guidedactions_selector_hide
.
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.
Theme attribute for the animation used in a GuidedActionsPresenter when the action
selector is animated in at activity start. Default is lb_guidedactions_selector_show
.
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.
Theme attribute for the style of the item selector in a GuidedActionsPresenter. Default is
Widget_Leanback_GuidedActionsSelectorStyle
.
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.
Returns the VerticalGridView that displays the list of GuidedActions.
Animates the entry of the fragment in the case where the activity is first being presented.
animators | A list of animations to which this provider's animations should be added. |
---|
Animates the exit of the fragment in the case where the activity is about to pause.
animators | A list of animations to which this provider's animations should be added. |
---|
Animates the view holder's view (or subviews thereof) when the action has had its check state changed.
vh | The view holder associated with the relevant action. |
---|---|
checked | True if the action has become checked, false if it has become unchecked. |
Animates the view holder's view (or subviews thereof) when the action has had its focus state changed.
vh | The view holder associated with the relevant action. |
---|---|
focused | True if the action has become focused, false if it has lost focus. |
Animates the view holder's view (or subviews thereof) when the action has had its press state changed.
vh | The view holder associated with the relevant action. |
---|---|
pressed | True if the action has been pressed, false if it has been unpressed. |
Binds a GuidedActionsStylist.ViewHolder
to a particular GuidedAction
.
vh | The view holder to be associated with the given action. |
---|---|
action | The guided action to be displayed by the view holder's view. |
Creates a view appropriate for displaying a list of GuidedActions, using the provided inflater and container.
Note: Does not actually add the created view to the container; the caller should do this.
inflater | The layout inflater to be used when constructing the view. |
---|---|
container | The view group to be passed in the call to
LayoutInflater.inflate . |
Constructs a GuidedActionsStylist.ViewHolder
capable of representing GuidedAction
s. Subclasses
may choose to return a subclass of ViewHolder.
Note: Should not actually add the created view to the parent; the caller will do this.
parent | The view group to be used as the parent of the new view. |
---|
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.
animators | A list of animations to which this provider's animations should be added. |
---|
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.
animators | A list of animations to which this provider's animations should be added. |
---|
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.
animators | A list of animations to which this provider's animations should be added. |
---|
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.
animators | A list of animations to which this provider's animations should be added. |
---|
Provides the resource ID of the layout defining the view for an individual guided actions.
Subclasses may override to provide their own customized layouts. The base implementation
returns lb_guidedactions_item
. 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.
Provides the resource ID of the layout defining the host view for the list of guided actions.
Subclasses may override to provide their own customized layouts. The base implementation
returns lb_guidedactions
. 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.