Class CommentViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.newsfeed.ui.details.CommentViewHolder
-
public class CommentViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolderTheRecyclerView.ViewHolderclass forNewsfeedDetailsAdapter
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.TextViewmCommentTextViewandroid.widget.ImageViewmDeleteImageViewandroid.widget.TextViewmDurationTextViewandroid.widget.ImageViewmProfileImageViewandroid.widget.TextViewmProfileNameTextViewSocialWidgetmSocialWidget
-
Constructor Summary
Constructors Constructor Description CommentViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(Comment comment, java.util.List<Flag> flags, boolean isUserAllowedToPost)Method to bind and display theCommentto theCommentViewHoldervoidsetPlaceHolderResource(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 theCommentto theCommentViewHolder- Parameters:
comment- theCommentto displayflags- the list ofFlagto 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-DrawableResid of the place holder resource
-
-