GuidedActionsStylist.ViewHolder
public class GuidedActionsStylist.ViewHolder extends RecyclerView.ViewHolder implements FacetProvider
| java.lang.Object | ||
| ↳ | androidx.recyclerview.widget.RecyclerView.ViewHolder | |
| ↳ | androidx.leanback.widget.GuidedActionsStylist.ViewHolder |
ViewHolder caches information about the action item layouts' subviews. Subclasses of GuidedActionsStylist may also wish to subclass this in order to add fields.
| See also | |
|---|---|
GuidedAction |
Summary
Public constructors |
|---|
ViewHolder(@NonNull View v)Constructs an ViewHolder and caches the relevant subviews. |
ViewHolder(@NonNull View v, boolean isSubAction)Constructs an ViewHolder for sub action and caches the relevant subviews. |
Public methods |
|
|---|---|
@Nullable GuidedAction |
|
@Nullable ImageView |
Returns the checkmark view within this view holder's view. |
@Nullable ImageView |
Returns the chevron view within this view holder's view. |
@Nullable View |
Returns the content view within this view holder's view, where title and description are shown. |
@Nullable TextView |
Returns the description view within this view holder's view. |
@Nullable EditText |
Convenience method to return an editable version of the description, if possible, or null if the description view isn't an EditText. |
@Nullable EditText |
Convenience method to return an editable version of the title, if possible, or null if the title view isn't an EditText. |
@Nullable View |
|
@Nullable Object |
Queries optional implemented facet. |
@Nullable ImageView |
Returns the icon view within this view holder's view. |
@Nullable TextView |
Returns the title view within this view holder's view. |
boolean |
Returns true if in editing title, description, or activator View, false otherwise. |
boolean |
Returns true if is in editing activator view with id guidedactions_activator_item, false otherwise. |
boolean |
Returns true if the TextView is in editing description, false otherwise. |
boolean |
Returns true if in editing title, description, so IME would be open. |
boolean |
Returns true if the TextView is in editing title, false otherwise. |
boolean |
Inherited methods |
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
ViewHolder
public ViewHolder(@NonNull View v)
Constructs an ViewHolder and caches the relevant subviews.
ViewHolder
public ViewHolder(@NonNull View v, boolean isSubAction)
Constructs an ViewHolder for sub action and caches the relevant subviews.
Public methods
getAction
public @Nullable GuidedAction getAction()
| Returns | |
|---|---|
@Nullable GuidedAction |
Currently bound action. |
getCheckmarkView
public @Nullable ImageView getCheckmarkView()
Returns the checkmark view within this view holder's view.
getChevronView
public @Nullable ImageView getChevronView()
Returns the chevron view within this view holder's view.
getContentView
public @Nullable View getContentView()
Returns the content view within this view holder's view, where title and description are shown.
getDescriptionView
public @Nullable TextView getDescriptionView()
Returns the description view within this view holder's view.
getEditableDescriptionView
public @Nullable EditText getEditableDescriptionView()
Convenience method to return an editable version of the description, if possible, or null if the description view isn't an EditText.
getEditableTitleView
public @Nullable EditText getEditableTitleView()
Convenience method to return an editable version of the title, if possible, or null if the title view isn't an EditText.
getFacet
public @Nullable Object getFacet(@NonNull Class<Object> facetClass)
Queries optional implemented facet.
| Parameters | |
|---|---|
@NonNull Class<Object> facetClass |
Facet classes to query, examples are: class of |
getIconView
public @Nullable ImageView getIconView()
Returns the icon view within this view holder's view.
getTitleView
public @Nullable TextView getTitleView()
Returns the title view within this view holder's view.
isInEditing
public boolean isInEditing()
Returns true if in editing title, description, or activator View, false otherwise.
isInEditingActivatorView
public boolean isInEditingActivatorView()
Returns true if is in editing activator view with id guidedactions_activator_item, false otherwise.
isInEditingDescription
public boolean isInEditingDescription()
Returns true if the TextView is in editing description, false otherwise.
isInEditingText
public boolean isInEditingText()
Returns true if in editing title, description, so IME would be open.
| Returns | |
|---|---|
boolean |
True if in editing title, description, so IME would be open, false otherwise. |
isInEditingTitle
public boolean isInEditingTitle()
Returns true if the TextView is in editing title, false otherwise.
isSubAction
public boolean isSubAction()
| Returns | |
|---|---|
boolean |
True if bound action is inside |