Class NewsViewHolder

    • 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
      • mAttachmentsAboveGridView

        public android.widget.LinearLayout mAttachmentsAboveGridView
      • mAttachmentsBelowGridView

        public android.widget.LinearLayout mAttachmentsBelowGridView
    • Constructor Detail

      • NewsViewHolder

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

      • bind

        public void bind​(Post post,
                         java.util.List<Flag> flags,
                         boolean allowedToComment,
                         boolean allowedToPost)
        Method to bind and display the Post to the NewsViewHolder
        Parameters:
        post - Post object
        flags - list of Flag
        allowedToComment - true - to allow the user to comment. This shows the comment button false - to not allow the user to comment. This hides the comment button
        allowedToPost - true - to allow the user to post. false - to not allow the user to post.
      • setPlaceHolderResource

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