Skip to content

sample(maps-app): follow system theme in LiteModeActivity and add documentation guide - #989

Merged
dkhawk merged 1 commit into
mainfrom
sample/dark-mode-lite-map
Sep 4, 2026
Merged

dkhawk merged 1 commit into
mainfrom
sample/dark-mode-lite-map

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds a guide and sample demonstrating how to configure and use a Lite Mode map that automatically follows the Android system theme and applies custom JSON dark styling.

Background

In Lite Mode, the Google Maps Android SDK serves static pre-rendered tiles and does not support dynamic MapColorScheme. To display a dark-themed map in Lite Mode, developers should observe the system setting using isSystemInDarkTheme() and dynamically supply a custom JSON map style via MapProperties.mapStyleOptions.

Changes Included

  • Documentation Guide: docs/lite-mode-dark-theme.md detailing the root cause, step-by-step implementation, and best practices.
  • Sample App: LiteModeActivity.kt updated to demonstrate following the system theme dynamically, with user override options and camera animations.
  • Back-Reference Links: LiteModeActivity.kt links to docs/lite-mode-dark-theme.md, and the guide links back to the sample via relative path.
  • README: Added link to the new guide under the Documentation section.
  • Regression Tests: Added unit/instrumentation tests in GoogleMapViewTests.kt asserting option preservation in Lite Mode.

@dkhawk
dkhawk requested a review from LoyalAbbas September 3, 2026 22:11
@googlemaps-bot

googlemaps-bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 24.59% -6.34% ❌
Files changed 0% ❌

File Coverage
LiteModeActivity.kt 0% -96.34% ❌

@dkhawk
dkhawk force-pushed the sample/dark-mode-lite-map branch 2 times, most recently from 19b2df3 to f8fddaa Compare September 3, 2026 22:58
@dkhawk dkhawk changed the title sample(maps-app): add dark mode and lite mode reproduction to LiteModeActivity sample(maps-app): demonstrate Lite Mode with dark theme and custom styling in LiteModeActivity Sep 3, 2026
@dkhawk
dkhawk force-pushed the sample/dark-mode-lite-map branch 2 times, most recently from 3c8c4e9 to 9cab43f Compare September 3, 2026 23:19
@dkhawk dkhawk changed the title sample(maps-app): demonstrate Lite Mode with dark theme and custom styling in LiteModeActivity sample(maps-app): follow system theme in LiteModeActivity and add documentation guide Sep 3, 2026
@dkhawk
dkhawk force-pushed the sample/dark-mode-lite-map branch from 9cab43f to 3ddfff3 Compare September 3, 2026 23:23
@dkhawk
dkhawk marked this pull request as ready for review September 3, 2026 23:25
@dkhawk
dkhawk requested a review from kikoso September 3, 2026 23:25

@LoyalAbbas LoyalAbbas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkhawk
dkhawk merged commit 594e268 into main Sep 4, 2026
13 of 14 checks passed
@dkhawk
dkhawk deleted the sample/dark-mode-lite-map branch September 4, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants