Class OfferResponsesViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.offers.ui.list.OfferResponsesViewHolder
-
public class OfferResponsesViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolder
TheRecyclerView.ViewHolder
class forOfferResponseListFragment
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.TextView
mAmount
android.widget.ImageView
mAvatar
android.widget.TextView
mBody
android.widget.ImageView
mClip
android.widget.TextView
mDate
android.widget.TextView
mDetails
android.widget.ProgressBar
mLoadingClip
android.widget.TextView
mName
OfferResponse
mOfferResponse
android.widget.TextView
mSubheading
-
Constructor Summary
Constructors Constructor Description OfferResponsesViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(OfferResponse offerResponse)
Method to bind and display theOfferResponse
to theOfferResponsesViewHolder
void
setClipped(boolean isClipped)
Set the clipped image ofmClip
void
setLoading(boolean isLoading)
Sets the loading state ofmClip
void
setPlaceHolderResource(int placeHolderResource)
Set the placeholder resource in the avatar viewvoid
setShowZeroPointAsFree(boolean showZeroPointAsFree)
Set the flag for showing the amount text as "Free" if the metric amount is zero.
-
-
-
Field Detail
-
mName
public android.widget.TextView mName
-
mAvatar
public android.widget.ImageView mAvatar
-
mSubheading
public android.widget.TextView mSubheading
-
mBody
public android.widget.TextView mBody
-
mDetails
public android.widget.TextView mDetails
-
mClip
public android.widget.ImageView mClip
-
mDate
public android.widget.TextView mDate
-
mAmount
public android.widget.TextView mAmount
-
mLoadingClip
public android.widget.ProgressBar mLoadingClip
-
mOfferResponse
public OfferResponse mOfferResponse
-
-
Method Detail
-
bind
public void bind(OfferResponse offerResponse)
Method to bind and display theOfferResponse
to theOfferResponsesViewHolder
- Parameters:
offerResponse
- 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
-
setShowZeroPointAsFree
public void setShowZeroPointAsFree(boolean showZeroPointAsFree)
Set the flag for showing the amount text as "Free" if the metric amount is zero.- Parameters:
showZeroPointAsFree
- true to show zero as free, else false
-
setLoading
public void setLoading(boolean isLoading)
Sets the loading state ofmClip
- Parameters:
isLoading
- true to changemClip
to loading state
-
setClipped
public void setClipped(boolean isClipped)
Set the clipped image ofmClip
- Parameters:
isClipped
- true - to show clipped image, false - to show unclipped image
-
-