public class

GuidedActionsStylist.ViewHolder

extends RecyclerView.ViewHolder

implements FacetProvider

 java.lang.Object

androidx.recyclerview.widget.RecyclerView.ViewHolder

↳androidx.leanback.widget.GuidedActionsStylist.ViewHolder

Overview

ViewHolder caches information about the action item layouts' subviews. Subclasses of GuidedActionsStylist may also wish to subclass this in order to add fields.

Summary

Fields
from RecyclerView.ViewHolderitemView
Constructors
publicViewHolder(View v)

Constructs an ViewHolder and caches the relevant subviews.

publicViewHolder(View v, boolean isSubAction)

Constructs an ViewHolder for sub action and caches the relevant subviews.

Methods
public GuidedActiongetAction()

public ImageViewgetCheckmarkView()

Returns the checkmark view within this view holder's view.

public ImageViewgetChevronView()

Returns the chevron view within this view holder's view.

public ViewgetContentView()

Returns the content view within this view holder's view, where title and description are shown.

public TextViewgetDescriptionView()

Returns the description view within this view holder's view.

public EditTextgetEditableDescriptionView()

Convenience method to return an editable version of the description, if possible, or null if the description view isn't an EditText.

public EditTextgetEditableTitleView()

Convenience method to return an editable version of the title, if possible, or null if the title view isn't an EditText.

public ViewgetEditingView()

public java.lang.ObjectgetFacet(java.lang.Class<java.lang.Object> facetClass)

public ImageViewgetIconView()

Returns the icon view within this view holder's view.

public TextViewgetTitleView()

Returns the title view within this view holder's view.

public booleanisInEditing()

Returns true if in editing title, description, or activator View, false otherwise.

public booleanisInEditingActivatorView()

Returns true if is in editing activator view with id guidedactions_activator_item, false otherwise.

public booleanisInEditingDescription()

Returns true if the TextView is in editing description, false otherwise.

public booleanisInEditingText()

Returns true if in editing title, description, so IME would be open.

public booleanisInEditingTitle()

Returns true if the TextView is in editing title, false otherwise.

public booleanisSubAction()

from RecyclerView.ViewHoldergetAbsoluteAdapterPosition, getAdapterPosition, getBindingAdapter, getBindingAdapterPosition, getItemId, getItemViewType, getLayoutPosition, getOldPosition, getPosition, isRecyclable, setIsRecyclable, toString
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructors

public ViewHolder(View v)

Constructs an ViewHolder and caches the relevant subviews.

public ViewHolder(View v, boolean isSubAction)

Constructs an ViewHolder for sub action and caches the relevant subviews.

Methods

public View getContentView()

Returns the content view within this view holder's view, where title and description are shown.

public TextView getTitleView()

Returns the title view within this view holder's view.

public EditText getEditableTitleView()

Convenience method to return an editable version of the title, if possible, or null if the title view isn't an EditText.

public TextView getDescriptionView()

Returns the description view within this view holder's view.

public EditText getEditableDescriptionView()

Convenience method to return an editable version of the description, if possible, or null if the description view isn't an EditText.

public ImageView getIconView()

Returns the icon view within this view holder's view.

public ImageView getCheckmarkView()

Returns the checkmark view within this view holder's view.

public ImageView getChevronView()

Returns the chevron view within this view holder's view.

public boolean isInEditing()

Returns true if in editing title, description, or activator View, false otherwise.

public boolean isInEditingText()

Returns true if in editing title, description, so IME would be open.

Returns:

True if in editing title, description, so IME would be open, false otherwise.

public boolean isInEditingTitle()

Returns true if the TextView is in editing title, false otherwise.

public boolean isInEditingDescription()

Returns true if the TextView is in editing description, false otherwise.

public boolean isInEditingActivatorView()

Returns true if is in editing activator view with id guidedactions_activator_item, false otherwise.

public View getEditingView()

Returns:

Current editing title view or description view or activator view or null if not in editing.

public boolean isSubAction()

Returns:

True if bound action is inside GuidedAction.getSubActions(), false otherwise.

public GuidedAction getAction()

Returns:

Currently bound action.

public java.lang.Object getFacet(java.lang.Class<java.lang.Object> facetClass)