Class BaseAttributeViewHolder<T>
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.challenges.ui.responses.profile.attribute.BaseAttributeViewHolder<T>
-
- Type Parameters:
T
- Type ofProfileAttribute
value
- Direct Known Subclasses:
BooleanViewHolder
,TextViewHolder
public abstract class BaseAttributeViewHolder<T> extends androidx.recyclerview.widget.RecyclerView.ViewHolder
TheRecyclerView.ViewHolder
base class forUpdateAttributeFragment
-
-
Constructor Summary
Constructors Constructor Description BaseAttributeViewHolder(android.view.View itemView)
Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
bind(ProfileAttribute attr)
Method to bind and display theProfileAttribute
to theBaseAttributeViewHolder
ProfileAttribute
getAttribute()
Returns the attribute attached to this viewvoid
setAttribute(ProfileAttribute attribute)
Attach attribute to viewabstract void
setLabel(java.lang.String text)
Set item labelabstract void
setValue(T value)
Set item value
-
-
-
Method Detail
-
setLabel
public abstract void setLabel(java.lang.String text)
Set item label- Parameters:
text
- label
-
setValue
public abstract void setValue(T value)
Set item value- Parameters:
value
- value
-
getAttribute
public ProfileAttribute getAttribute()
Returns the attribute attached to this view- Returns:
- the
ProfileAttribute
-
setAttribute
public void setAttribute(ProfileAttribute attribute)
Attach attribute to view- Parameters:
attribute
- instance ofProfileAttribute
-
bind
public abstract void bind(ProfileAttribute attr)
Method to bind and display theProfileAttribute
to theBaseAttributeViewHolder
- Parameters:
attr
-ProfileAttribute
to display
-
-