Widget Documentation: LMFeedSearchBarView
Widget: LMFeedSearchBarView
The LMFeedSearchBarView is a customizable search bar widget designed for handling search input and events, with configurable styles for icons, input fields, and layout.
| Method | Description |
|---|---|
| initialize(lifecycleScope: LifecycleCoroutineScope) | Initializes the search bar with a lifecycle scope. |
| setSearchViewListener(mSearchViewListener: LMFeedSearchBarListener) | Sets the listener for search bar events. |
| closeSearch() | Closes the search bar view. |
| setStyle(searchBarViewStyle: LMFeedSearchBarViewStyle) | Applies the given style to the search bar view. |
| openSearch() | Opens the search bar view. |
| observeSearchView(debounce: Boolean = true) | Observes the text changes in the search bar with an optional debounce. |
| onSearchViewOpened() | Callback when the search bar is opened. |
| onSearchViewClosed() | Callback when the search bar is closed. |
| onSearchCrossed() | Callback when the search bar's cross button is clicked. |
| onKeywordEntered(keyword: String) | Callback when a keyword is entered in the search bar. |
| onEmptyKeywordEntered() | Callback when an empty keyword is entered in the search bar. |
View Style: LMFeedSearchBarViewStyle
The LMFeedSearchBarViewStyle defines the appearance and layout properties for the LMFeedSearchBarView, including configurations for text input, icons, and background.
| Field | Description | Type |
|---|---|---|
| searchInputStyle | Configures the style for the search input field. | LMFeedEditTextStyle |
| searchBackIconStyle | Configures the style for the back icon. | LMFeedIconStyle |
| searchCloseIconStyle | Configures the style for the close icon. | LMFeedIconStyle |
| backgroundColor | Specifies the background color of the search bar view. | Int |
| elevation | Specifies the elevation of the search bar view. | Int |