Class ProductAttributesViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.products.ui.productattribute.ProductAttributesViewHolder
-
public class ProductAttributesViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolderTheRecyclerView.ViewHolderclass forProductAttributesAdapter
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.CheckBoxattributeCheckboxandroid.view.ViewattributeContainerandroid.widget.TextViewattributeHeadingandroid.widget.TextViewattributeSubheadingandroid.widget.TextViewcalorieTextViewandroid.view.Viewseparator
-
Constructor Summary
Constructors Constructor Description ProductAttributesViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindData(AttributeOption attributeOption, java.lang.String subHeading, java.lang.String calorie)Bind the data fromAttributeOptionto the current views present on this viewholdervoidbindHeader()Populates the views for the header itemvoidsetComponentName(java.lang.String componentName)Register the current component info displayed on the headingvoidsetHasSelected(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 fromAttributeOptionto the current views present on this viewholder- Parameters:
attributeOption- instance ofAttributeOptionused 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
-
-