mapbox / mapbox/mapbox-navigation-android
How to make navigationview switch Light or Dark style when navigating
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
We use com.mapbox.navigation.ui.NavigationView(sdk v1.2.0-rc.2) for navigation.We need to deal with the case that user switch the mode(Dark or Light ) by the device's setting option( Android 10 and higher) after the navigationview created(eg. navigating).
[We force dark mode and set "" to controll the event by oureself](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#force_dark).
We found that NavigationView only set its style according the style when it created.But it would not change its style dynamically, if we switch the mode when navigating.
Is there any way for us to deal with it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with com.mapbox.navigation.ui.NavigationView in SDK v1.2.0-rc.2 and the Android uiMode configuration described in the issue. Reproduce a device Light/Dark mode change while navigation is active and determine whether the existing view updates dynamically; done means the behavior is resolved or its supported limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100