Skip to main content

Search

Navigation SDK UX Framework comes with a built-in search experience, which can be customized according to your needs. For example you can hide the panel with search categories in free drive state. You can also change number of results displayed in full screen and category search.

Additionally, you can configure the entrance mode for the search screen by entranceMode argument. Pass a specific argument:

  • SearchEntranceMode.RECENT - to open search screen from recent history tab
  • SearchEntranceMode.SEARCH - to open search screen focused in input area with opened keyboard if it is available
val config = DashConfig.create(
applicationContext = applicationContext,
accessToken = getString(R.string.mapbox_access_token)
) {
searchConfig {
showCategoriesPanel = false
querySearchLimit = 5
categorySearchLimit = 24
entranceMode = SearchEntranceMode.SEARCH // Default value is: SearchEntranceMode.RECENT
}
}
Dash.init(config)

It is also possible to update search options in runtime:

Dash.applyUpdate {
searchConfig {
showCategoriesPanel = false
querySearchLimit = 5
categorySearchLimit = 24
}
}
Was this page helpful?