Class OfferResponsesViewHolder


  • public class OfferResponsesViewHolder
    extends androidx.recyclerview.widget.RecyclerView.ViewHolder
    The RecyclerView.ViewHolder class for OfferResponseListFragment
    • 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  
      • Fields inherited from class androidx.recyclerview.widget.RecyclerView.ViewHolder

        itemView
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(OfferResponse offerResponse)
      Method to bind and display the OfferResponse to the OfferResponsesViewHolder
      void setClipped​(boolean isClipped)
      Set the clipped image of mClip
      void setLoading​(boolean isLoading)
      Sets the loading state of mClip
      void setPlaceHolderResource​(int placeHolderResource)
      Set the placeholder resource in the avatar view
      void setShowZeroPointAsFree​(boolean showZeroPointAsFree)
      Set the flag for showing the amount text as "Free" if the metric amount is zero.
      • 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

      • 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
    • Constructor Detail

      • OfferResponsesViewHolder

        public OfferResponsesViewHolder​(@NonNull
                                        android.view.View itemView)
    • Method Detail

      • 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 of mClip
        Parameters:
        isLoading - true to change mClip to loading state
      • setClipped

        public void setClipped​(boolean isClipped)
        Set the clipped image of mClip
        Parameters:
        isClipped - true - to show clipped image, false - to show unclipped image