Screen: LMFeedSocialFeedFragment
The LMFeedSocialFeedFragment
serves as a core fragment in the LikeMinds Feed Android module, responsible for displaying and managing the social feed interface. It enables users to interact with various posts, including viewing, liking, commenting, sharing, and more.
GitHub File: LMFeedSocialFeedFragment.kt
View Style: LMFeedSocialFeedFragmentViewStyle
The LMFeedSocialFeedFragmentViewStyle
defines the style and layout properties for components used within the LMFeedSocialFeedFragment
. This includes configurations for headers, buttons, and other layout elements.
GitHub File: LMFeedSocialFeedFragmentViewStyle.kt
Field | Description | Type |
---|---|---|
headerViewStyle | Style configuration for the header view. | LMFeedHeaderViewStyle |
createNewPostButtonViewStyle | Style for the floating action button for new posts. | LMFeedFABStyle |
noPostLayoutViewStyle | Style for the "No Posts" layout. | LMFeedNoEntityLayoutViewStyle |
postingViewStyle | Style configuration for the posting view. | LMFeedPostingViewStyle |
topicSelectorBarStyle | Style for the topic selector bar. | LMFeedTopicSelectorBarStyle |
Customization Available in LMFeedSocialFeedFragment
The fragment provides several methods to customize its components:
Create New Post Button
- customizeCreateNewPostButton(fabNewPost: LMFeedFAB):
Customize the appearance and behavior of the floating action button for creating new posts.
- customizeCreateNewPostButton(fabNewPost: LMFeedFAB):
Header View
- customizeSocialFeedHeaderView(headerViewSocial: LMFeedHeaderView): Modify the social feed header view's appearance and functionality.
Social Feed List View
- customizeSocialFeedListView(rvUniversal: LMFeedSocialFeedListView):
Customize the recycler view that displays the list of social feed posts.
- customizeSocialFeedListView(rvUniversal: LMFeedSocialFeedListView):
No Post Layout
- customizeNoPostLayout(layoutNoPost: LMFeedNoEntityLayoutView:)
Adjust the layout shown when there are no posts to display.
- customizeNoPostLayout(layoutNoPost: LMFeedNoEntityLayoutView:)
Posting Layout
- customizePostingLayout(layoutPosting: LMFeedPostingView):
Modify the posting layout where users can draft and post content.
- customizePostingLayout(layoutPosting: LMFeedPostingView):
Topic Selector Bar
- customizeTopicSelectorBar(topicSelectorBar: LMFeedTopicSelectorBarView):
Customize the topic selector bar, which allows users to filter posts by topics.
- customizeTopicSelectorBar(topicSelectorBar: LMFeedTopicSelectorBarView):
Interactions Available in LMFeedSocialFeedFragment
The fragment also provides numerous methods to handle user interactions, categorized as follows:
Post Content Interactions
onPostContentClicked(position: Int, postViewData: LMFeedPostViewData)
Triggered when the main content of a post is clicked.onPostContentSeeMoreClicked(position: Int, postViewData: LMFeedPostViewData)
Handles "See More" clicks within post content.onPostContentLinkClicked(url: String)
Fires when a hyperlink in the post content is clicked.
Post Actions
onPostLikeClicked(position: Int, postViewData: LMFeedPostViewData)
Triggered when a user likes a post.onPostLikesCountClicked(position: Int, postViewData: LMFeedPostViewData)
Handles clicks on the likes count of a post.onPostCommentsCountClicked(position: Int, postViewData: LMFeedPostViewData)
Fires when the comments count is clicked, typically opening the comments section.onPostSaveClicked(position: Int, postViewData: LMFeedPostViewData)
Fires when a user saves a post.onPostShareClicked(position: Int, postViewData: LMFeedPostViewData)
Triggered when a user shares a post.
Post Media Interactions
onPostImageMediaClicked(position: Int, postViewData: LMFeedPostViewData)
Triggered when an image in a post is clicked.onPostVideoMediaClicked(position: Int, postViewData: LMFeedPostViewData)
Handles clicks on video media in a post.onPostLinkMediaClicked(position: Int, postViewData: LMFeedPostViewData)
Triggered when a link-type media is clicked.onPostDocumentMediaClicked(parentPosition: Int, attachmentViewData: LMFeedAttachmentViewData)
Handles clicks on document media.onPostMultipleMediaImageClicked(parentPosition: Int, attachmentViewData: LMFeedAttachmentViewData)
Fired when an image in a carousel or multiple media post is clicked.onPostMultipleMediaVideoClicked(parentPosition: Int, attachmentViewData: LMFeedAttachmentViewData)
Fires when a video in a carousel or multiple media post is clicked.
Poll Interactions
onPostPollTitleClicked(position: Int, postViewData: LMFeedPostViewData)
Triggered when the title of a poll post is clicked.onPostAddPollOptionClicked(position: Int, postViewData: LMFeedPostViewData)
Allows the user to add a poll option.onPostMemberVotedCountClicked(position: Int, postViewData: LMFeedPostViewData)
Fires when the number of members who voted is clicked.onPostSubmitPollVoteClicked(position: Int, postViewData: LMFeedPostViewData)
Submits a vote in a poll.onPostEditPollVoteClicked(position: Int, postViewData: LMFeedPostViewData)
Triggered when the user wants to edit their vote on a poll.onPollOptionClicked(pollPosition: Int, pollOptionPosition: Int, pollOptionViewData: LMFeedPollOptionViewData)
Fires when a user selects a specific poll option.onPollOptionVoteCountClicked(pollPosition: Int, pollOptionPosition: Int, pollOptionViewData: LMFeedPollOptionViewData)
Triggered when the vote count for a poll option is clicked.
Menu and Navigation
onPostMenuIconClicked(position: Int, anchorView: View, postViewData: LMFeedPostViewData)
Opens a context menu for post actions like editing or deleting.onPostMenuItemClicked(position: Int, menuId: Int, postViewData: LMFeedPostViewData)
Handles specific menu item clicks for posts.onEditPostMenuClicked(position: Int, menuId: Int, post: LMFeedPostViewData)
Triggered when the "Edit Post" option is clicked.onDeletePostMenuClicked(position: Int, menuId: Int, post: LMFeedPostViewData)
Fires when the "Delete Post" option is clicked.onReportPostMenuClicked(position: Int, menuId: Int, post: LMFeedPostViewData)
Allows reporting a post.onPinPostMenuClicked(position: Int, menuId: Int, post: LMFeedPostViewData)
Triggered to pin a post to the top.onUnpinPostMenuClicked(position: Int, menuId: Int, post: LMFeedPostViewData)
Handles unpinning a post.onUserProfileClicked(userViewData: LMFeedUserViewData)
Navigates to the user's profile when their name or avatar is clicked.onNotificationIconClicked()
Handles clicks on the notification icon.onSearchIconClicked()
Triggered when the search icon is clicked.onRetryUploadClicked(temporaryId: Long?, attachmentCount: Int)
Allows retrying an upload after a failure.onAllTopicsClicked()
Fired when the "All Topics" button is clicked.