From 0ed6f68a8e29947d3e361ead775bb3a9ff5cc376 Mon Sep 17 00:00:00 2001 From: yurykanetski Date: Fri, 6 Jun 2025 13:50:06 +0200 Subject: [PATCH] ManeuverViewBinder: get rid of `TransitionManager#go` --- .../dropin/maneuver/ManeuverViewBinder.kt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libnavui-dropin/src/main/java/com/mapbox/navigation/dropin/maneuver/ManeuverViewBinder.kt b/libnavui-dropin/src/main/java/com/mapbox/navigation/dropin/maneuver/ManeuverViewBinder.kt index c33226f40b3..88c92c06899 100644 --- a/libnavui-dropin/src/main/java/com/mapbox/navigation/dropin/maneuver/ManeuverViewBinder.kt +++ b/libnavui-dropin/src/main/java/com/mapbox/navigation/dropin/maneuver/ManeuverViewBinder.kt @@ -1,10 +1,8 @@ package com.mapbox.navigation.dropin.maneuver -import android.transition.Scene -import android.transition.TransitionManager +import android.view.LayoutInflater import android.view.ViewGroup import com.mapbox.navigation.core.lifecycle.MapboxNavigationObserver -import com.mapbox.navigation.dropin.R import com.mapbox.navigation.dropin.databinding.MapboxManeuverGuidanceLayoutBinding import com.mapbox.navigation.dropin.internal.extensions.reloadOnChange import com.mapbox.navigation.dropin.navigationview.NavigationViewContext @@ -18,13 +16,11 @@ internal class ManeuverViewBinder( ) : UIBinder { override fun bind(viewGroup: ViewGroup): MapboxNavigationObserver { - val scene = Scene.getSceneForLayout( - viewGroup, - R.layout.mapbox_maneuver_guidance_layout, - viewGroup.context + viewGroup.removeAllViews() + val binding = MapboxManeuverGuidanceLayoutBinding.inflate( + LayoutInflater.from(viewGroup.context), + viewGroup ) - TransitionManager.go(scene) - val binding = MapboxManeuverGuidanceLayoutBinding.bind(viewGroup) return reloadOnChange( context.mapStyleLoader.loadedMapStyle,