Class FriendsViewHolder


  • public class FriendsViewHolder
    extends androidx.recyclerview.widget.RecyclerView.ViewHolder
    The RecyclerView.ViewHolder class for FriendsFragment
    • Field Summary

      Fields 
      Modifier and Type Field Description
      android.widget.ImageView mAvatar  
      android.widget.TextView mName  
      android.widget.TextView mPoints  
      android.widget.TextView mRank  
      • Fields inherited from class androidx.recyclerview.widget.RecyclerView.ViewHolder

        itemView
    • Constructor Summary

      Constructors 
      Constructor Description
      FriendsViewHolder​(android.view.View itemView)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(Friend friend)
      Method to bind and display the Friend to the FriendsViewHolder
      void setPlaceholder​(int placeholder)
      Set the placeholder resource in the avatar view
      • 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
      • mRank

        public android.widget.TextView mRank
      • mAvatar

        public android.widget.ImageView mAvatar
      • mPoints

        public android.widget.TextView mPoints
    • Constructor Detail

      • FriendsViewHolder

        public FriendsViewHolder​(android.view.View itemView)
    • Method Detail

      • setPlaceholder

        public void setPlaceholder​(@DrawableRes
                                   int placeholder)
        Set the placeholder resource in the avatar view
        Parameters:
        placeholder - DrawableRes id of the place holder resource