Package com.xffffff.wellfed.mealplan
Class MealPlanViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.xffffff.wellfed.mealplan.MealPlanViewHolder
-
public class MealPlanViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolderThe 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
-
-
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.TextViewgetCategoryTextView()getCategoryTextView is the getter for categoryTextViewcom.google.android.material.card.MaterialCardViewgetMaterialCardView()getMaterialCardView is the getter for materialCardViewandroid.widget.TextViewgetTitleTextView()getTitleTextView is the getter for titleTextViewandroid.widget.TextViewgetWeekTextView()getWeekTextView is the getter for weekTextViewvoidsetCardStyle(java.lang.String variant)Set card style method sets the card style for filled and outlined variantsvoidsetDateCircle(java.util.Date date, java.lang.Boolean isPrimary)setDateCircle method sets the date circle
-
-
-
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 dateisPrimary- 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"
-
-