mapbox / mapbox/mapbox-navigation-android

Switch between light/dark UI colors and day/night map style depending on time of day

Open
#4,660 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature jira-sync-complete platform parity
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

The map view should automatically switch between the Mapbox Navigation Day and Mapbox Navigation Night map styles (or corresponding styles specified by the developer) based on the time of day and also when entering or exiting a tunnel. Foreground and background colors throughout the built-in UI components should also change to match the map style.

## Rationale

The Navigation Day and Navigation Night styles were designed to be legible in different lighting conditions. We should not blind the user with a day style at night or force them to squint at a night style during the day. In addition to facilitating day/night switching, this feature enables developers to thoroughly customize the look and feel of disparate UI components without writing too much code.

The iOS navigation SDK calls this customization system “[styles](https://docs.mapbox.com/ios/beta/navigation/guides/app-styling/)”, though we sometimes refer to it as “UI styles” or “themes” or “skins” to differentiate it from the more basic style switching functionality exposed by the map SDK. We should have an analogous system in place on Android, even if the specifics will differ according to platform conventions.

## Design notes

The application should be able to configure the navigation SDK to call the appropriate map style switching code in the map SDK. It should not be up to the application to switch the map style directly. If possible, prefer a declarative approach to specifying the colors over an imperative approach.

/ref #1057 #3423
/cc @mapbox/navigation-android

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 by reviewing the referenced issues #1057 and #3423 and the linked iOS styles guide to understand the intended customization model. Done should include developer-configurable day/night map styles and coordinated UI colors that respond to time of day and tunnel entry or exit.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
design, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.