Class CommentViewHolder


  • public class CommentViewHolder
    extends androidx.recyclerview.widget.RecyclerView.ViewHolder
    The RecyclerView.ViewHolder class for NewsfeedDetailsAdapter
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(Comment comment, java.util.List<Flag> flags, boolean isUserAllowedToPost)
      Method to bind and display the Comment to the CommentViewHolder
      void setPlaceHolderResource​(int placeHolderResource)
      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

      • mProfileImageView

        public android.widget.ImageView mProfileImageView
      • mDeleteImageView

        public android.widget.ImageView mDeleteImageView
      • mProfileNameTextView

        public android.widget.TextView mProfileNameTextView
      • mDurationTextView

        public android.widget.TextView mDurationTextView
      • mCommentTextView

        public android.widget.TextView mCommentTextView
    • Constructor Detail

      • CommentViewHolder

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

      • bind

        public void bind​(Comment comment,
                         java.util.List<Flag> flags,
                         boolean isUserAllowedToPost)
        Method to bind and display the Comment to the CommentViewHolder
        Parameters:
        comment - the Comment to display
        flags - the list of Flag to be used when flagging a comment
        isUserAllowedToPost - flag to control the visibility of flag view in SocialWidget
      • setPlaceHolderResource

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