Class HostViewHolder


  • public class HostViewHolder
    extends androidx.recyclerview.widget.RecyclerView.ViewHolder
    The RecyclerView.ViewHolder class for HostsAdapter
    • Field Summary

      Fields 
      Modifier and Type Field Description
      android.view.View mAvatarContainer  
      android.widget.ImageView mAvatarView  
      android.widget.TextView mJobTitleView  
      android.widget.TextView mNameView  
      android.widget.TextView mPlaceHolderText  
      • 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​(Host host)
      Populate the views with Host passed on this method
      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

      • mAvatarView

        public android.widget.ImageView mAvatarView
      • mAvatarContainer

        public android.view.View mAvatarContainer
      • mNameView

        public android.widget.TextView mNameView
      • mJobTitleView

        public android.widget.TextView mJobTitleView
      • mPlaceHolderText

        public android.widget.TextView mPlaceHolderText
    • Constructor Detail

      • HostViewHolder

        public HostViewHolder​(android.view.View itemView)
        Constructor for HostViewHolder
        Parameters:
        itemView - view used to bind with current view holder
    • Method Detail

      • bind

        public void bind​(Host host)
        Populate the views with Host passed on this method
        Parameters:
        host - the Host used
      • setPlaceHolder

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