Open OttyLab opened 3 years ago
@JunDai can you take a look at this when you have a chance? 🙏
it's related to the fix of https://github.com/mapbox/mapbox-navigation-android/issues/1990 I can check more soon.
@OttyLab - thanks for using our SDK and reporting this issue.
Did you find this issue when you were using our NavigationView
component? I would guess you were using the InstructionView
and SummaryBottomSheet
stand-alone widgets in your layout? In this case, there is an API setDistanceFormatter
that would allow you to pass in a distanceFormatter during runtime.
I will revisit this piece and see if we can unify the locale for those three places.
@JunDai
Thanks, you are right. This is caused when I do NOT use NavigationVew
and do NOT set DistanceFormatter
by myself. (NavigationView
set both formatter by using voice unit and there's no problem)
Therefore this is a feature request rather than a bug ticket. If SDK provides a way to set up both formatter in one place, it's straightforward.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Mapbox Navigation SDK version: v1.1.0
Steps to trigger behavior
Expected behavior
Remaining distance and remaining time should use same locale.
Details
DistanceFomatter
inSummaryBottomSheet
is initialized here with system locale.DistanceFormetter
inInstructionView
is initialized here with system locale.TimeFormatter
inSummaryBottomSheet
is initialized here with voiceLocale in response of directions API if possible.