Class CommentViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.newsfeed.ui.details.CommentViewHolder
-
public class CommentViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolder
TheRecyclerView.ViewHolder
class forNewsfeedDetailsAdapter
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.TextView
mCommentTextView
android.widget.ImageView
mDeleteImageView
android.widget.TextView
mDurationTextView
android.widget.ImageView
mProfileImageView
android.widget.TextView
mProfileNameTextView
SocialWidget
mSocialWidget
-
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 theComment
to theCommentViewHolder
void
setPlaceHolderResource(int placeHolderResource)
Set the placeholder resource in the avatar view
-
-
-
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
-
mSocialWidget
public SocialWidget mSocialWidget
-
-
Method Detail
-
bind
public void bind(Comment comment, java.util.List<Flag> flags, boolean isUserAllowedToPost)
Method to bind and display theComment
to theCommentViewHolder
- Parameters:
comment
- theComment
to displayflags
- the list ofFlag
to be used when flagging a commentisUserAllowedToPost
- flag to control the visibility of flag view inSocialWidget
-
setPlaceHolderResource
public void setPlaceHolderResource(@DrawableRes int placeHolderResource)
Set the placeholder resource in the avatar view- Parameters:
placeHolderResource
-DrawableRes
id of the place holder resource
-
-