UICoordinator

abstract class UICoordinator<T : ViewGroup>(viewGroup: T) : MapboxNavigationObserver

Attach a UICoordinator to a ViewGroup of your choosing. When you implement this class you will need to build a Flow with Binder. There can only be one view binder attached at a time for the ViewGroup.

Constructors

Link copied to clipboard
fun <T : ViewGroup> UICoordinator(viewGroup: T)

Functions

Link copied to clipboard
abstract fun MapboxNavigation.flowViewBinders(): Flow<Binder<T>>

Create your flowable Binder. This allows you to use a flowable state to determine what is being shown in the viewGroup.

Link copied to clipboard
open override fun onAttached(mapboxNavigation: MapboxNavigation)

Signals that the mapboxNavigation instance is attached and ready for use.

Link copied to clipboard
open override fun onDetached(mapboxNavigation: MapboxNavigation)

Signals that the mapboxNavigation instance is being detached.

Properties

Link copied to clipboard
lateinit var coroutineScope: CoroutineScope

Defines a scope for new coroutine