public static class GuidedActionsStylist.ViewHolder extends RecyclerView.ViewHolder implements FacetProvider
GuidedActionsStylist
may also wish to subclass this in order to add fields.GuidedAction
itemView
Constructor and Description |
---|
ViewHolder(View v)
Constructs an ViewHolder and caches the relevant subviews.
|
ViewHolder(View v,
boolean isSubAction)
Constructs an ViewHolder for sub action and caches the relevant subviews.
|
Modifier and Type | Method and Description |
---|---|
GuidedAction |
getAction() |
ImageView |
getCheckmarkView()
Returns the checkmark view within this view holder's view.
|
ImageView |
getChevronView()
Returns the chevron view within this view holder's view.
|
View |
getContentView()
Returns the content view within this view holder's view, where title and description are
shown.
|
TextView |
getDescriptionView()
Returns the description view within this view holder's view.
|
EditText |
getEditableDescriptionView()
Convenience method to return an editable version of the description, if possible,
or null if the description view isn't an EditText.
|
EditText |
getEditableTitleView()
Convenience method to return an editable version of the title, if possible,
or null if the title view isn't an EditText.
|
View |
getEditingView() |
Object |
getFacet(Class<?> facetClass)
Queries optional implemented facet.
|
ImageView |
getIconView()
Returns the icon view within this view holder's view.
|
TextView |
getTitleView()
Returns the title view within this view holder's view.
|
boolean |
isInEditing()
Returns true if in editing title, description, or activator View, false otherwise.
|
boolean |
isInEditingActivatorView()
Returns true if is in editing activator view with id guidedactions_activator_item, false
otherwise.
|
boolean |
isInEditingDescription()
Returns true if the TextView is in editing description, false otherwise.
|
boolean |
isInEditingText()
Returns true if in editing title, description, so IME would be open.
|
boolean |
isInEditingTitle()
Returns true if the TextView is in editing title, false otherwise.
|
boolean |
isSubAction() |
getAdapterPosition, getItemId, getItemViewType, getLayoutPosition, getOldPosition, getPosition, isRecyclable, setIsRecyclable, toString
public ViewHolder(View v)
public ViewHolder(View v, boolean isSubAction)
public View getContentView()
public TextView getTitleView()
public EditText getEditableTitleView()
public TextView getDescriptionView()
public EditText getEditableDescriptionView()
public ImageView getIconView()
public ImageView getCheckmarkView()
public ImageView getChevronView()
public boolean isInEditing()
public boolean isInEditingText()
public boolean isInEditingTitle()
public boolean isInEditingDescription()
public boolean isInEditingActivatorView()
public View getEditingView()
public boolean isSubAction()
GuidedAction.getSubActions()
, false
otherwise.public GuidedAction getAction()
public Object getFacet(Class<?> facetClass)
FacetProvider
getFacet
in interface FacetProvider
facetClass
- Facet classes to query, examples are: class of
ItemAlignmentFacet
.