Search Bar
A text field with built-in listeners specially catered to search features (onQueryChange, onSearch).
- In the expanded state,
SearchBarwill fill its container's width and height. The alternativeDockedSearchBaris more flexible as it does not fill its container's width. SearchBarwill throw a vague Exception if its container's height is unspecified.SearchBaritself mostly handles the decor; anything related to typing is managed bySearchBarDefaults.InputField.- Clicking on a search result list item will not trigger
InputField#onSearch(). This makes sense sinceonSearch()is a function ofInputField.InputField#onSearch()can be triggered by pressing the ENTER key on the soft keyboard.
Docked Search Bar
DockedSearchBar is a variation of SearchBar that doesn't fill its container's width.