NavigationFragment

An Android fragment wrapping TomTomNavigation. It provides the UI that shows information about the oncoming manoeuvres, route parameters (like ETA and remaining distance), current speed and the speed limit.

It can be instantiated either programmatically via NavigationFragment.newInstance(navigationUiOptions: NavigationUiOptions) or via the XML view inflation.

Important: This is a Public Preview API. It may be changed or removed at any time.

See also

NavigationFragmentResources

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Listens for navigation events.

Properties

Link copied to clipboard
open override val navigationView: NavigationView

Returns the configurable navigation view.

Inherited properties

Link copied to clipboard
@get:NonNull
open override val lifecycle: Lifecycle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:NonNull
open override val viewModelStore: ViewModelStore

Functions

Link copied to clipboard
Link copied to clipboard

Changes the language which will be used to synthesize audio messages.

Link copied to clipboard

Changes which TextToSpeechEngine will be used to synthesize audio instructions. TextToSpeechEngine.close is called on TextToSpeechEngine which is being replaced.

Link copied to clipboard
open override fun onConfigurationChanged(newConfig: Configuration)
Link copied to clipboard
open override fun onCreate(savedInstanceState: Bundle?)
Link copied to clipboard
open override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, state: Bundle?): View
Link copied to clipboard
open override fun onDestroy()
Link copied to clipboard
open override fun onDestroyView()
Link copied to clipboard
open override fun onInflate(context: Context, attrs: AttributeSet, savedInstanceState: Bundle?)
Link copied to clipboard
open override fun onViewCreated(view: View, savedInstanceState: Bundle?)
Link copied to clipboard
Link copied to clipboard
fun resumeNavigation(navigationResumeSnapshot: NavigationResumeSnapshot)

Resumes navigation with provided NavigationResumeSnapshot. This method wraps the call to TomTomNavigation.resume. When called, the UI starts showing Route's guidance, current speed and speed limit. NavigationListener.onStarted is called when navigation has been started.

Link copied to clipboard

Sets a provided routePlan as active. This method wraps the call to TomTomNavigation.setActiveRoutePlan.

Link copied to clipboard
fun setTomTomNavigation(tomTomNavigation: TomTomNavigation)

Sets an instance of TomTomNavigation. It has to be called before calling any other navigation method, such as: startNavigation(routes: List), setActiveRoutePlan or stopNavigation().

Link copied to clipboard

Sets the units for distance and speed.

Link copied to clipboard

Starts navigation without a Route. This method wraps the call to TomTomNavigation.start. Navigation will proceed with following steps:

fun startNavigation(routePlan: RoutePlan)

Starts navigation with provided RoutePlan. This method wraps the call to TomTomNavigation.start. When called, the UI starts showing Route's guidance, current speed and speed limit. NavigationListener.onStarted is called when navigation has been started.

Link copied to clipboard

Stops the navigation. This method wraps the call to TomTomNavigation.stop. When called, the UI stops showing Route's guidance, current speed and speed limit.

Inherited functions

Link copied to clipboard
Link copied to clipboard
operator override fun equals(@Nullable other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getId(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getView(): View?
Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onActivityResult(p0: Int, p1: Int, @Nullable p2: Intent?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onLowMemory()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setArguments(@Nullable p0: Bundle?)
Link copied to clipboard
Link copied to clipboard
open fun setExitTransition(@Nullable p0: Any?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setTargetFragment(@Nullable p0: Fragment?, p1: Int)
Link copied to clipboard
Link copied to clipboard
open fun startActivity(@NonNull p0: Intent)
open fun startActivity(@NonNull p0: Intent, @Nullable p1: Bundle?)
Link copied to clipboard
Link copied to clipboard
open fun startIntentSenderForResult(@NonNull p0: IntentSender, p1: Int, @Nullable p2: Intent?, p3: Int, p4: Int, p5: Int, @Nullable p6: Bundle?)
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard