Class OffersViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.offers.ui.list.OffersViewHolder
-
- Direct Known Subclasses:
SwipeOffersViewHolder
public class OffersViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolder
TheRecyclerView.ViewHolder
class forOffersListFragment
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.ImageView
mAvatar
android.widget.TextView
mBody
android.view.View
mContainer
android.widget.TextView
mDetails
android.widget.TextView
mName
android.widget.TextView
mSubheading
-
Constructor Summary
Constructors Constructor Description OffersViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(Offer offer)
Method to bind and display theOffer
to theOffersViewHolder
void
setEnableShowImageOnBackground(boolean showImageOnBackground)
Set the flag for enabling the image on background of the containervoid
setPlaceHolderResource(int placeHolderResource)
Set the placeholder resource in the avatar view
-
-
-
Method Detail
-
bind
public void bind(Offer offer)
Method to bind and display theOffer
to theOffersViewHolder
- Parameters:
offer
- theOffer
to display
-
setPlaceHolderResource
public void setPlaceHolderResource(@DrawableRes int placeHolderResource)
Set the placeholder resource in the avatar view- Parameters:
placeHolderResource
-DrawableRes
id of the place holder resource
-
setEnableShowImageOnBackground
public void setEnableShowImageOnBackground(boolean showImageOnBackground)
Set the flag for enabling the image on background of the container- Parameters:
showImageOnBackground
- true to enable showing of image on background, else false
-
-