Class MealPlanViewHolder


  • public class MealPlanViewHolder
    extends androidx.recyclerview.widget.RecyclerView.ViewHolder
    The MealPlanViewHolder class contains the layout for each individual item in the RecyclerView.

    Citation: Create dynamic lists with RecyclerView. Android Developers. (n.d.). Retrieved September 26, 2022, from https://developer.android.com/develop/ui/views/layout/recyclerview

    • Field Summary

      • Fields inherited from class androidx.recyclerview.widget.RecyclerView.ViewHolder

        itemView
    • Constructor Summary

      Constructors 
      Constructor Description
      MealPlanViewHolder​(android.view.View itemView)
      MealPlanViewHolder is the constructor for the MealPlanViewHolder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      android.widget.TextView getCategoryTextView()
      getCategoryTextView is the getter for categoryTextView
      com.google.android.material.card.MaterialCardView getMaterialCardView()
      getMaterialCardView is the getter for materialCardView
      android.widget.TextView getTitleTextView()
      getTitleTextView is the getter for titleTextView
      android.widget.TextView getWeekTextView()
      getWeekTextView is the getter for weekTextView
      void setCardStyle​(java.lang.String variant)
      Set card style method sets the card style for filled and outlined variants
      void setDateCircle​(java.util.Date date, java.lang.Boolean isPrimary)
      setDateCircle method sets the date circle
      • 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
    • Constructor Detail

      • MealPlanViewHolder

        public MealPlanViewHolder​(@NonNull
                                  android.view.View itemView)
        MealPlanViewHolder is the constructor for the MealPlanViewHolder
        Parameters:
        itemView - the view
    • Method Detail

      • getMaterialCardView

        public com.google.android.material.card.MaterialCardView getMaterialCardView()
        getMaterialCardView is the getter for materialCardView
        Returns:
        the materialCardView
      • getWeekTextView

        public android.widget.TextView getWeekTextView()
        getWeekTextView is the getter for weekTextView
        Returns:
        the weekTextView
      • getTitleTextView

        public android.widget.TextView getTitleTextView()
        getTitleTextView is the getter for titleTextView
        Returns:
        the titleTextView
      • getCategoryTextView

        public android.widget.TextView getCategoryTextView()
        getCategoryTextView is the getter for categoryTextView
        Returns:
        the categoryTextView
      • setDateCircle

        public void setDateCircle​(java.util.Date date,
                                  java.lang.Boolean isPrimary)
        setDateCircle method sets the date circle
        Parameters:
        date - the date
        isPrimary - whether the date circle is primary
      • setCardStyle

        public void setCardStyle​(java.lang.String variant)
        Set card style method sets the card style for filled and outlined variants
        Parameters:
        variant - "filled" or "outlined"