Skip to main content

Widget Documentation: LMFeedTopicSelectorBarView

Widget: LMFeedTopicSelectorBarView

The LMFeedTopicSelectorBarView is a customizable bar widget for topic selection, supporting features like managing selected topics, clear options, and click listeners, with configurable styles.

MethodDescription
setStyle(topicSelectorBarStyle: LMFeedTopicSelectorBarViewStyle)Applies the given style to the topic selector bar.
setAllTopicsText(allTopicsText: String)Sets the text for the "All Topics" label.
setClearTopicsText(clearTopicsText: String)Sets the text for the "Clear Topics" label.
setAllTopicsClickListener(listener: LMFeedOnClickListener)Registers a click listener for the "All Topics" label.
setClearSelectedTopicsClickListener(listener: LMFeedOnClickListener)Registers a click listener for the "Clear Topics" label.
setAllTopicsTextVisibility(isVisible: Boolean)Toggles the visibility of the "All Topics" label.
setSelectedTopicFilterVisibility(isVisible: Boolean)Toggles the visibility of the selected topic filter.
setSelectedTopicAdapter(listener: LMFeedSelectedTopicAdapterListener)Sets the adapter for the selected topics.
getAllSelectedTopics(): ListRetrieves all selected topics.
replaceSelectedTopics(selectedTopics: List)Replaces the current list of selected topics with a new list.
clearSelectedTopicsAndNotify()Clears all selected topics and notifies the adapter.
removeTopicAndNotify(position: Int)Removes a topic at the specified position and notifies the adapter.

View the code on GitHub

View Style: LMFeedTopicSelectorBarViewStyle

The LMFeedTopicSelectorBarViewStyle defines the appearance and layout properties for the LMFeedTopicSelectorBarView, including configurations for text, icons, and background.

FieldDescriptionType
allTopicsSelectorStyleConfigures the text style for the "All Topics" label.LMFeedTextStyle
clearTopicFilterStyleConfigures the text style for the "Clear Topics" label.LMFeedTextStyle
selectedTopicTextStyleConfigures the text style for the selected topics.LMFeedTextStyle
removeSelectedTopicIconStyleConfigures the style for the remove icon on selected topics.LMFeedIconStyle
backgroundColorSpecifies the background color of the topic selector bar.Int
elevationSpecifies the elevation of the topic selector bar.Int

View the code on GitHub