Class ProductAttributesViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.products.ui.productattribute.ProductAttributesViewHolder
-
public class ProductAttributesViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolder
TheRecyclerView.ViewHolder
class forProductAttributesAdapter
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.CheckBox
attributeCheckbox
android.view.View
attributeContainer
android.widget.TextView
attributeHeading
android.widget.TextView
attributeSubheading
android.widget.TextView
calorieTextView
android.view.View
separator
-
Constructor Summary
Constructors Constructor Description ProductAttributesViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindData(AttributeOption attributeOption, java.lang.String subHeading, java.lang.String calorie)
Bind the data fromAttributeOption
to the current views present on this viewholdervoid
bindHeader()
Populates the views for the header itemvoid
setComponentName(java.lang.String componentName)
Register the current component info displayed on the headingvoid
setHasSelected(boolean hasSelected)
Set configuration for selected flag
-
-
-
Field Detail
-
attributeHeading
public android.widget.TextView attributeHeading
-
attributeSubheading
public android.widget.TextView attributeSubheading
-
attributeCheckbox
public android.widget.CheckBox attributeCheckbox
-
attributeContainer
public android.view.View attributeContainer
-
calorieTextView
public android.widget.TextView calorieTextView
-
separator
public android.view.View separator
-
-
Method Detail
-
bindHeader
public void bindHeader()
Populates the views for the header item
-
bindData
public void bindData(AttributeOption attributeOption, java.lang.String subHeading, java.lang.String calorie)
Bind the data fromAttributeOption
to the current views present on this viewholder- Parameters:
attributeOption
- instance ofAttributeOption
used to populatesubHeading
- message displayed in subheading viewcalorie
- message displayed in calorie view
-
setComponentName
public void setComponentName(java.lang.String componentName)
Register the current component info displayed on the heading- Parameters:
componentName
- message to display on the heading view
-
setHasSelected
public void setHasSelected(boolean hasSelected)
Set configuration for selected flag- Parameters:
hasSelected
- true to set item as selected, else false
-
-