Class NewsViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.newsfeed.ui.list.NewsViewHolder
-
public class NewsViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NewsViewHolder.SUPPORTED_VIDEO_TYPES
Current video types supported.
-
Field Summary
Fields Modifier and Type Field Description android.widget.LinearLayout
mAttachmentsAboveGridView
android.widget.LinearLayout
mAttachmentsBelowGridView
android.widget.TextView
mContentTextView
android.widget.ImageView
mDeleteNewsButton
android.widget.TextView
mDurationTextView
LinkPreviewView
mLinkPreview
android.widget.ImageView
mPinnedPostButton
android.widget.ImageView
mProfileImageView
android.widget.TextView
mProfileNameTextView
android.view.View
mRootView
SocialWidget
mSocialWidget
ViewShareUrlWidget
mViewShareWidget
-
Constructor Summary
Constructors Constructor Description NewsViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(Post post, java.util.List<Flag> flags, boolean allowedToComment, boolean allowedToPost)
Method to bind and display thePost
to theNewsViewHolder
void
setAttachmentClickListener(OnAttachmentClickListener attachmentClickListener)
Set the listener for clicking an attachment (image or video)void
setPlaceHolderResource(int placeHolderResource)
Set the placeholder resource in the avatar view
-
-
-
Field Detail
-
mRootView
public android.view.View mRootView
-
mProfileImageView
public android.widget.ImageView mProfileImageView
-
mProfileNameTextView
public android.widget.TextView mProfileNameTextView
-
mDurationTextView
public android.widget.TextView mDurationTextView
-
mDeleteNewsButton
public android.widget.ImageView mDeleteNewsButton
-
mPinnedPostButton
public android.widget.ImageView mPinnedPostButton
-
mContentTextView
public android.widget.TextView mContentTextView
-
mSocialWidget
public SocialWidget mSocialWidget
-
mViewShareWidget
public ViewShareUrlWidget mViewShareWidget
-
mAttachmentsAboveGridView
public android.widget.LinearLayout mAttachmentsAboveGridView
-
mAttachmentsBelowGridView
public android.widget.LinearLayout mAttachmentsBelowGridView
-
mLinkPreview
public LinkPreviewView mLinkPreview
-
-
Method Detail
-
setAttachmentClickListener
public void setAttachmentClickListener(OnAttachmentClickListener attachmentClickListener)
Set the listener for clicking an attachment (image or video)- Parameters:
attachmentClickListener
-OnAttachmentClickListener
-
bind
public void bind(Post post, java.util.List<Flag> flags, boolean allowedToComment, boolean allowedToPost)
Method to bind and display thePost
to theNewsViewHolder
-
setPlaceHolderResource
public void setPlaceHolderResource(@DrawableRes int placeHolderResource)
Set the placeholder resource in the avatar view- Parameters:
placeHolderResource
-DrawableRes
id of the place holder resource
-
-