Class TextViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.challenges.ui.responses.profile.attribute.BaseAttributeViewHolder<java.lang.String>
-
- com.cheetahdigital.challenges.ui.responses.profile.attribute.TextViewHolder
-
- Direct Known Subclasses:
DateViewHolder
,EmailViewHolder
,GenderViewHolder
,NumberViewHolder
,PhoneViewHolder
public class TextViewHolder extends BaseAttributeViewHolder<java.lang.String>
TheRecyclerView.ViewHolder
class forUpdateAttributeFragment
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.EditText
editText
com.google.android.material.textfield.TextInputLayout
textInputLayout
android.widget.TextView
textView
-
Constructor Summary
Constructors Constructor Description TextViewHolder(android.view.View itemView)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(ProfileAttribute attr)
Method to bind and display theProfileAttribute
to theBaseAttributeViewHolder
void
setLabel(java.lang.String text)
Set item labelvoid
setUseLabelAsHint(boolean useLabelAsHint)
Sets which view to use that will display the label of the attribute.void
setValue(java.lang.String value)
Set item value-
Methods inherited from class com.cheetahdigital.challenges.ui.responses.profile.attribute.BaseAttributeViewHolder
getAttribute, setAttribute
-
-
-
-
Method Detail
-
setLabel
public void setLabel(java.lang.String text)
Description copied from class:BaseAttributeViewHolder
Set item label- Specified by:
setLabel
in classBaseAttributeViewHolder<java.lang.String>
- Parameters:
text
- label
-
setValue
public void setValue(java.lang.String value)
Description copied from class:BaseAttributeViewHolder
Set item value- Specified by:
setValue
in classBaseAttributeViewHolder<java.lang.String>
- Parameters:
value
- value
-
bind
public void bind(ProfileAttribute attr)
Description copied from class:BaseAttributeViewHolder
Method to bind and display theProfileAttribute
to theBaseAttributeViewHolder
- Specified by:
bind
in classBaseAttributeViewHolder<java.lang.String>
- Parameters:
attr
-ProfileAttribute
to display
-
setUseLabelAsHint
public void setUseLabelAsHint(boolean useLabelAsHint)
Sets which view to use that will display the label of the attribute. Default view used istextView
.- Parameters:
useLabelAsHint
- true to usetextInputLayout
, false to usetextView
-
-