Search panel customization
On this page
You can customize the search panel by providing your own UI written in Jetpack Compose.
Customization Process
DashNavigationFragment provides setSearchPanel function for search panel customization. It accepts a lambda with two parameters, modifier and state. modifier is an instance of Modifier used by default implementations. state parameter is an instance of SearchPanelState.
The search screen can be opened using Dash.controller.openSearch function. The user's favorite places can be observed using Dash.controller.observeFavorites function.
Example Usage
For real-world implementations of a custom search panel, visit our GitHub repository.
You can hide the search panel completely at any point during runtime:
fragment.setSearchPanel { _, _ -> }
See Also
GUIDE
Search panel configuration
Learn how to change the search panel's position.
Was this page helpful?