Skip to main content

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.

MethodDescription
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 the code on GitHub

View Style: LMFeedSearchBarViewStyle

The LMFeedSearchBarViewStyle defines the appearance and layout properties for the LMFeedSearchBarView, including configurations for text input, icons, and background.

FieldDescriptionType
searchInputStyleConfigures the style for the search input field.LMFeedEditTextStyle
searchBackIconStyleConfigures the style for the back icon.LMFeedIconStyle
searchCloseIconStyleConfigures the style for the close icon.LMFeedIconStyle
backgroundColorSpecifies the background color of the search bar view.Int
elevationSpecifies the elevation of the search bar view.Int

View the code on GitHub