Package com.tomtom.ivi.platform.frontend.api.common.uicontrols.navigation

Types

Link copied to clipboard
class Breadcrumb(    val label: StringResolver,     val icon: DrawableResolver? = null,     val onClicked: () -> Unit = {})

Represents a breadcrumb. Part of NavigationBarViewModel, so that the navigation bar can show a breadcrumb for each panel that the end-user can navigate to.

Link copied to clipboard

An interface for view models which provides panel navigation data, such as navigationBarViewModel.

Link copied to clipboard
data class NavigationBarViewModel(    val showBackButton: Boolean = false,     val onBackButtonClicked: () -> Unit = {},     val title: StringResolver? = null,     val breadcrumbs: List<Breadcrumb> = emptyList())

View model for a navigation bar, such as TtNavigationBar. The navigation bar allows the end-user to navigate between different panels.

Functions

Link copied to clipboard
fun TtNavigationBar.setViewModel(viewModel: NavigationBarViewModel?)

Adapter to set a NavigationBarViewModel for a TtNavigationBar.

Link copied to clipboard
fun LiveData<NavigationBarViewModel?>.withBackButton(): LiveData<NavigationBarViewModel?>

Converts LiveData of NavigationBarViewModel to the same type and content, except that NavigationBarViewModel.showBackButton is set to true.

Link copied to clipboard
fun LiveData<NavigationBarViewModel?>.withoutBackButton(): LiveData<NavigationBarViewModel?>

Converts LiveData of NavigationBarViewModel to the same type and content, except that NavigationBarViewModel.showBackButton is set to false.

Link copied to clipboard
fun LiveData<NavigationBarViewModel?>.withoutBreadcrumbs(): LiveData<NavigationBarViewModel?>

Converts LiveData of NavigationBarViewModel to the same type and content, except that NavigationBarViewModel.breadcrumbs is set to an empty list.

Link copied to clipboard
fun LiveData<NavigationBarViewModel?>.withoutTitle(): LiveData<NavigationBarViewModel?>

Converts LiveData of NavigationBarViewModel to the same type and content, except that NavigationBarViewModel.title is set to null.