Widget Documentation: LMFeedSearchListView
Widget: LMFeedSearchListView
The LMFeedSearchListView
is a customizable list view for displaying search results, supporting features like video auto-play, pagination, and dynamic post management.
Method | Description |
---|---|
initiateVideoAutoPlayer() | Initiates the video auto-player functionality. |
refreshVideoAutoPlayer() | Refreshes the video auto-player functionality. |
destroyVideoAutoPlayer() | Destroys the video auto-player functionality. |
initAdapterAndSetListener(listener: LMFeedPostAdapterListener) | Initializes the adapter and sets a listener for post actions. |
setAdapter() | Sets the adapter for the list view. |
setPaginationScrollListener(scrollListener: LMFeedEndlessRecyclerViewScrollListener) | Sets the pagination scroll listener. |
resetScrollListenerData() | Resets the scroll listener's data. |
allPosts(): List | Retrieves all posts from the list. |
replacePosts(posts: List) | Replaces the current list of posts with a new list. |
addPosts(posts: List) | Adds a list of posts to the current list. |
removePostAtIndex(index: Int) | Removes a post at the specified index. |
clearPostsAndNotify() | Clears all posts and notifies the adapter. |
getIndexAndPostFromAdapter(postId: String): [Pair](Int, LMFeedPostViewData) | Retrieves the index and post data from the adapter based on the post ID. |
getPostFromAdapter(position: Int): LMFeedPostViewData | Retrieves the post data from the adapter based on its position. |
updatePostWithoutNotifying(position: Int, postItem: LMFeedPostViewData) | Updates a post item at the specified position without notifying the adapter. |
updatePostItem(position: Int, updatedPostItem: LMFeedPostViewData) | Updates a post item at the specified position and notifies the adapter. |
scrollToPositionWithOffset(position: Int) | Scrolls to the specified position with an offset. |