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.
| Method | Description |
|---|---|
| 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(): List | Retrieves 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 Style: LMFeedTopicSelectorBarViewStyle
The LMFeedTopicSelectorBarViewStyle defines the appearance and layout properties for the LMFeedTopicSelectorBarView, including configurations for text, icons, and background.
| Field | Description | Type |
|---|---|---|
| allTopicsSelectorStyle | Configures the text style for the "All Topics" label. | LMFeedTextStyle |
| clearTopicFilterStyle | Configures the text style for the "Clear Topics" label. | LMFeedTextStyle |
| selectedTopicTextStyle | Configures the text style for the selected topics. | LMFeedTextStyle |
| removeSelectedTopicIconStyle | Configures the style for the remove icon on selected topics. | LMFeedIconStyle |
| backgroundColor | Specifies the background color of the topic selector bar. | Int |
| elevation | Specifies the elevation of the topic selector bar. | Int |