Class ProductAttributesViewHolder


  • public class ProductAttributesViewHolder
    extends androidx.recyclerview.widget.RecyclerView.ViewHolder
    The RecyclerView.ViewHolder class for ProductAttributesAdapter
    • 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 from AttributeOption to the current views present on this viewholder
      void bindHeader()
      Populates the views for the header item
      void setComponentName​(java.lang.String componentName)
      Register the current component info displayed on the heading
      void setHasSelected​(boolean hasSelected)
      Set configuration for selected flag
      • Methods inherited from class androidx.recyclerview.widget.RecyclerView.ViewHolder

        getAdapterPosition, getItemId, getItemViewType, getLayoutPosition, getOldPosition, getPosition, isRecyclable, setIsRecyclable, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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
    • Constructor Detail

      • ProductAttributesViewHolder

        public ProductAttributesViewHolder​(android.view.View itemView)
    • 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 from AttributeOption to the current views present on this viewholder
        Parameters:
        attributeOption - instance of AttributeOption used to populate
        subHeading - message displayed in subheading view
        calorie - 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