belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
Action
public
class
Action
extends Object
java.lang.Object | |
↳ | android.support.v17.leanback.widget.Action |
Known Direct Subclasses |
An action contains one or two lines of text, an optional image and an optional id. It may also be invoked by one or more keycodes.
Summary
Constants | |
---|---|
long |
NO_ID
Indicates that an id has not been set. |
Public constructors | |
---|---|
Action(long id)
Constructor for an Action. |
|
Action(long id, CharSequence label)
Constructor for an Action. |
|
Action(long id, CharSequence label1, CharSequence label2)
Constructor for an Action. |
|
Action(long id, CharSequence label1, CharSequence label2, Drawable icon)
Constructor for an Action. |
Public methods | |
---|---|
final
void
|
addKeyCode(int keyCode)
Adds a keycode used to invoke this Action. |
final
Drawable
|
getIcon()
Returns the icon drawable for this Action. |
final
long
|
getId()
Returns the id for this Action. |
final
CharSequence
|
getLabel1()
Returns the first line label for this Action. |
final
CharSequence
|
getLabel2()
Returns the second line label for this Action. |
final
void
|
removeKeyCode(int keyCode)
Removes a keycode used to invoke this Action. |
final
boolean
|
respondsToKeyCode(int keyCode)
Returns true if the Action should respond to the given keycode. |
final
void
|
setIcon(Drawable icon)
Sets the icon drawable for this Action. |
final
void
|
setId(long id)
Sets the id for this Action. |
final
void
|
setLabel1(CharSequence label)
Sets the first line label for this Action. |
final
void
|
setLabel2(CharSequence label)
Sets the second line label for this Action. |
String
|
toString()
|
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Constants
NO_ID
long NO_ID
Indicates that an id has not been set.
Constant Value: -1 (0xffffffffffffffff)
Public constructors
Action
Action (long id)
Constructor for an Action.
Parameters | |
---|---|
id |
long : The id of the Action.
|
Action
Action (long id, CharSequence label)
Constructor for an Action.
Parameters | |
---|---|
id |
long : The id of the Action. |
label |
CharSequence : The label to display for the Action.
|
Action
Action (long id, CharSequence label1, CharSequence label2)
Constructor for an Action.
Parameters | |
---|---|
id |
long : The id of the Action. |
label1 |
CharSequence : The label to display on the first line of the Action. |
label2 |
CharSequence : The label to display on the second line of the Action.
|
Action
Action (long id, CharSequence label1, CharSequence label2, Drawable icon)
Constructor for an Action.
Parameters | |
---|---|
id |
long : The id of the Action. |
label1 |
CharSequence : The label to display on the first line of the Action. |
label2 |
CharSequence : The label to display on the second line of the Action. |
icon |
Drawable : The icon to display for the Action.
|
Public methods
addKeyCode
void addKeyCode (int keyCode)
Adds a keycode used to invoke this Action.
Parameters | |
---|---|
keyCode |
int |
getIcon
Drawable getIcon ()
Returns the icon drawable for this Action.
Returns | |
---|---|
Drawable |
getLabel1
CharSequence getLabel1 ()
Returns the first line label for this Action.
Returns | |
---|---|
CharSequence |
getLabel2
CharSequence getLabel2 ()
Returns the second line label for this Action.
Returns | |
---|---|
CharSequence |
removeKeyCode
void removeKeyCode (int keyCode)
Removes a keycode used to invoke this Action.
Parameters | |
---|---|
keyCode |
int |
respondsToKeyCode
boolean respondsToKeyCode (int keyCode)
Returns true if the Action should respond to the given keycode.
Parameters | |
---|---|
keyCode |
int |
Returns | |
---|---|
boolean |
setIcon
void setIcon (Drawable icon)
Sets the icon drawable for this Action.
Parameters | |
---|---|
icon |
Drawable |
setLabel1
void setLabel1 (CharSequence label)
Sets the first line label for this Action.
Parameters | |
---|---|
label |
CharSequence |
setLabel2
void setLabel2 (CharSequence label)
Sets the second line label for this Action.
Parameters | |
---|---|
label |
CharSequence |
toString
String toString ()
Returns | |
---|---|
String |
Interfaces
- BaseGridView.OnKeyInterceptListener
- BaseGridView.OnMotionInterceptListener
- BaseGridView.OnTouchInterceptListener
- BaseGridView.OnUnhandledKeyListener
- BaseOnItemViewClickedListener
- BaseOnItemViewSelectedListener
- BrowseFrameLayout.OnChildFocusListener
- BrowseFrameLayout.OnFocusSearchListener
- FacetProvider
- FacetProviderAdapter
- FocusHighlight
- FragmentAnimationProvider
- ImeKeyMonitor
- ImeKeyMonitor.ImeKeyListener
- MultiActionsProvider
- OnActionClickedListener
- OnChildLaidOutListener
- OnChildSelectedListener
- OnItemViewClickedListener
- OnItemViewSelectedListener
- PlaybackSeekUi
- SearchBar.SearchBarListener
- SearchBar.SearchBarPermissionListener
- SearchEditText.OnKeyboardDismissListener
- SpeechRecognitionCallback
- TitleViewAdapter.Provider
- ViewHolderTask
Classes
- AbstractDetailsDescriptionPresenter
- AbstractDetailsDescriptionPresenter.ViewHolder
- AbstractMediaItemPresenter
- AbstractMediaItemPresenter.ViewHolder
- AbstractMediaListHeaderPresenter
- AbstractMediaListHeaderPresenter.ViewHolder
- Action
- ArrayObjectAdapter
- BaseCardView
- BaseCardView.LayoutParams
- BaseGridView
- BrowseFrameLayout
- ClassPresenterSelector
- ControlButtonPresenterSelector
- CursorObjectAdapter
- DetailsOverviewLogoPresenter
- DetailsOverviewLogoPresenter.ViewHolder
- DetailsOverviewRow
- DetailsOverviewRow.Listener
- DetailsOverviewRowPresenter
- DetailsOverviewRowPresenter.ViewHolder
- DetailsParallax
- DiffCallback
- DividerPresenter
- DividerRow
- FocusHighlightHelper
- FullWidthDetailsOverviewRowPresenter
- FullWidthDetailsOverviewRowPresenter.Listener
- FullWidthDetailsOverviewRowPresenter.ViewHolder
- FullWidthDetailsOverviewRowPresenter.ViewHolder.DetailsOverviewRowListener
- FullWidthDetailsOverviewSharedElementHelper
- GuidanceStylist
- GuidanceStylist.Guidance
- GuidedAction
- GuidedAction.Builder
- GuidedAction.BuilderBase
- GuidedActionDiffCallback
- GuidedActionEditText
- GuidedActionsStylist
- GuidedActionsStylist.ViewHolder
- GuidedDatePickerAction
- GuidedDatePickerAction.Builder
- GuidedDatePickerAction.BuilderBase
- HeaderItem
- HorizontalGridView
- HorizontalHoverCardSwitcher
- ImageCardView
- ItemAlignmentFacet
- ItemAlignmentFacet.ItemAlignmentDef
- ItemBridgeAdapter
- ItemBridgeAdapter.AdapterListener
- ItemBridgeAdapter.ViewHolder
- ItemBridgeAdapter.Wrapper
- ItemBridgeAdapterShadowOverlayWrapper
- ListRow
- ListRowHoverCardView
- ListRowPresenter
- ListRowPresenter.SelectItemViewHolderTask
- ListRowPresenter.ViewHolder
- ListRowView
- MultiActionsProvider.MultiAction
- ObjectAdapter
- ObjectAdapter.DataObserver
- OnChildViewHolderSelectedListener
- PageRow
- Parallax
- Parallax.FloatProperty
- Parallax.IntProperty
- Parallax.PropertyMarkerValue
- ParallaxEffect
- ParallaxTarget
- ParallaxTarget.DirectPropertyTarget
- ParallaxTarget.PropertyValuesHolderTarget
- PlaybackControlsRow
- PlaybackControlsRow.ClosedCaptioningAction
- PlaybackControlsRow.FastForwardAction
- PlaybackControlsRow.HighQualityAction
- PlaybackControlsRow.MoreActions
- PlaybackControlsRow.MultiAction
- PlaybackControlsRow.OnPlaybackProgressCallback
- PlaybackControlsRow.PictureInPictureAction
- PlaybackControlsRow.PlayPauseAction
- PlaybackControlsRow.RepeatAction
- PlaybackControlsRow.RewindAction
- PlaybackControlsRow.ShuffleAction
- PlaybackControlsRow.SkipNextAction
- PlaybackControlsRow.SkipPreviousAction
- PlaybackControlsRow.ThumbsAction
- PlaybackControlsRow.ThumbsDownAction
- PlaybackControlsRow.ThumbsUpAction
- PlaybackControlsRowPresenter
- PlaybackControlsRowPresenter.ViewHolder
- PlaybackRowPresenter
- PlaybackRowPresenter.ViewHolder
- PlaybackSeekDataProvider
- PlaybackSeekDataProvider.ResultCallback
- PlaybackSeekUi.Client
- PlaybackTransportRowPresenter
- PlaybackTransportRowPresenter.ViewHolder
- Presenter
- Presenter.ViewHolder
- Presenter.ViewHolderTask
- PresenterSelector
- PresenterSwitcher
- RecyclerViewParallax
- RecyclerViewParallax.ChildPositionProperty
- Row
- RowHeaderPresenter
- RowHeaderPresenter.ViewHolder
- RowHeaderView
- RowPresenter
- RowPresenter.ViewHolder
- SearchBar
- SearchEditText
- SearchOrbView
- SearchOrbView.Colors
- SectionRow
- ShadowOverlayContainer
- ShadowOverlayHelper
- ShadowOverlayHelper.Builder
- ShadowOverlayHelper.Options
- SinglePresenterSelector
- SparseArrayObjectAdapter
- SpeechOrbView
- TitleHelper
- TitleView
- TitleViewAdapter
- VerticalGridPresenter
- VerticalGridPresenter.ViewHolder
- VerticalGridView