Closed bpepper88 closed 2 months ago
And I found the fix.
val transitionOptions: (ValueAnimator.() -> Unit) =
{
duration = 0
}
currentLocation?.let {
navigationLocationProvider.changePosition(
Location.Builder()
.longitude(it.longitude)
.latitude(it.latitude)
.bearing(bearingState.doubleValue)
.build()
, bearingTransitionOptions = transitionOptions)
}
Added bearingTransitionOptions with animation duration 0. Maybe it would be good idea to set by default duration to 0 and then developer can add it if needed.
Environment
Observed behavior and steps to reproduce
Use code below to draw the puck. On bearing change of the phone sensor I update the position which updats the puck bearing. It works but after I move the phone the puck bearing image is animated to the new position very, VERY, slowly and it's not instant. It looks as it's using an animation to get to latest bearing position.
Code:
Expected behavior
That puck bearing image will move immediately and with no delay together with bearing of the phone.