mapbox / mapbox/mapbox-navigation-android

How to make navigationview switch Light or Dark style when navigating

Open
#3,808 2 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.