tomtom-international / tomtom-navigation-android-examples

TomTom Navigation SDK examples
https://developer.tomtom.com/android/navigation/documentation/overview/introduction
Other
23 stars 4 forks source link

Jetpack Compose usage #100

Open Fr3di opened 4 months ago

Fr3di commented 4 months ago

Is it possible to use the map (map-display) with Jetpack Compose? I am struggling to display the map without using xml

Czeach commented 4 months ago

Yes @Fr3di, it's possible. I've written about it here

Fr3di commented 4 months ago

Thx but it still requires to use xml file which ideally I would like to avoid after moving fully to Jetpack Compose. Unfortunatelly seems like that's the only way for now. Thx anyway @Czeach :)

Czeach commented 4 months ago

You can actually do it without creating the xml container, just replace the container id with R.id.content when creating the map fragment. It'll work but it's less ideal.