Class BaseAttributeViewHolder<T>
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.challenges.ui.responses.profile.attribute.BaseAttributeViewHolder<T>
-
- Type Parameters:
T- Type ofProfileAttributevalue
- Direct Known Subclasses:
BooleanViewHolder,TextViewHolder
public abstract class BaseAttributeViewHolder<T> extends androidx.recyclerview.widget.RecyclerView.ViewHolderTheRecyclerView.ViewHolderbase 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 voidbind(ProfileAttribute attr)Method to bind and display theProfileAttributeto theBaseAttributeViewHolderProfileAttributegetAttribute()Returns the attribute attached to this viewvoidsetAttribute(ProfileAttribute attribute)Attach attribute to viewabstract voidsetLabel(java.lang.String text)Set item labelabstract voidsetValue(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 theProfileAttributeto theBaseAttributeViewHolder- Parameters:
attr-ProfileAttributeto display
-
-