Skip to content

feat(settings): unify 3D quick settings widget and dedicated UI controls showcase - #78

Merged
dkhawk merged 8 commits into
mainfrom
feat/quick-settings-widget
Oct 14, 2026
Merged

dkhawk merged 8 commits into
mainfrom
feat/quick-settings-widget

Conversation

@dkhawk

@dkhawk dkhawk commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Consolidates the stacked 3D Maps camera UI control improvements (PR #78, PR #79, and PR #80) into a single cohesive branch with 100% 3-way parity across Kotlin Views, Java Views, and Jetpack Compose. This supersedes PR #79 and PR #80.

Key Changes

1. Dedicated UI Controls Showcase (UiControlsActivity)

  • Adds dedicated showcase activities in Kotlin Views, Java Views, and Jetpack Compose demonstrating built-in camera UI controls (Zoom, Tilt, Rotate, Compass, Pan Vertical, Pan Horizontal).
  • Directly calls Maps 3D SDK APIs (googleMap3D.getUiControlSettings()?.setUiControlsPlacement(...)) rather than routing through sample helper controllers.
  • Maintains isolated local UI chip state to prevent session pollution (tapping "Hide all" no longer affects subsequent samples).

2. Quick Settings Overlay (Map3DQuickSettingsButton & Map3DQuickSettingsWidget)

  • Compact mini-FAB in Views and overlay widget in Compose allowing live runtime switching of Map Mode (Satellite, Hybrid, Roadmap), Color Scheme (Follow System, Light, Dark), and Camera Controls.
  • Managed by session-scoped Map3DSettingsController with full JVM unit test coverage.

3. Review Comments Addressed & Cleanups

  • Reflection removed: Deleted resolveMapView(googleMap3D) reflection and internal LinearLayout mutations (offsetTopControlContainers).
  • Standardized SDK types: Replaced UiControlsPlacementPosition alias with SDK canonical ControlPlacement everywhere; standardized on ControlOrientation.VERTICAL.
  • Method naming: Standardized on attachMap across all activities.
  • Compose stability: Prevented NoSuchFieldError: No field $stable crash on stripped Map3DView.$stable in Kotlin 2.x Compose compiler.
  • Top controls clipping: Set Map3DView dimensions to 0dp (match_constraint) in activity_hello_map.xml and activity_camera_controls.xml.
  • Duplicate checks & Lint: Guarded TrackedMap3D against duplicates and adopted view.isVisible.

Testing & Verification

  • Unit Tests: ./gradlew :Maps3DSamples:ApiDemos:common:testDebugUnitTest -Puse_local_maven=true (PASSED)
  • Debug Assembles: :kotlin-app, :java-app, :ComposeDemos:app, :snippets:kotlin-app, :snippets:java-app (ALL PASSED)
  • Spotless formatting: ./gradlew spotlessApply (PASSED)

@dkhawk
dkhawk requested a review from LoyalAbbas October 8, 2026 20:34
@dkhawk
dkhawk marked this pull request as ready for review October 9, 2026 17:24
@dkhawk
dkhawk force-pushed the feat/quick-settings-widget branch from 703d017 to 4c09a61 Compare October 12, 2026 18:42

@LoyalAbbas LoyalAbbas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from feat/upgrade_to_16.0.0 to main October 14, 2026 08:43
@LoyalAbbas
LoyalAbbas force-pushed the feat/quick-settings-widget branch from 703d017 to d9ad649 Compare October 14, 2026 12:55
@LoyalAbbas
LoyalAbbas added this pull request to stack #82 October 14, 2026 12:55
dkhawk added a commit that referenced this pull request Oct 14, 2026
…ols showcase

Consolidates the stacked 3D Maps camera UI control improvements (PR #78,
PR #79, and PR #80) into a single cohesive branch with 100% 3-way parity
across Kotlin Views, Java Views, and Jetpack Compose.

- Quick Settings Overlay: Map3DQuickSettingsButton (Views) and
  Map3DQuickSettingsWidget (Compose) with session-scoped Map3DSettingsController.
- Dedicated UI Controls Showcase: Introduces UiControlsActivity across
  Kotlin, Java, and Compose calling the Maps 3D SDK directly
  (getUiControlSettings().setUiControlsPlacement(...)) with local UI state.
- SDK Standards: Removed internal reflection hacks into GoogleMap3D and
  LinearLayout layout mutations; standardized on ControlPlacement and
  ControlOrientation.VERTICAL.
- Stability & Robustness: Prevents Compose NoSuchFieldError on stripped
   fields, fixes top control clipping under toolbars, and adds
  comprehensive JVM unit tests in Map3DSettingsControllerTest.
@dkhawk dkhawk changed the title feat(settings): add 3D map quick settings widget with camera controls toggle feat(settings): unify 3D quick settings widget and dedicated UI controls showcase Oct 14, 2026
… toggle

- Introduce Map3DQuickSettingsButton for Kotlin and Java Views
- Introduce Map3DQuickSettingsWidget for Jetpack Compose
- Support live switching of Map Mode (Satellite, Hybrid, Roadmap)
- Support live switching of Color Scheme (System, Light, Dark)
- Support master and granular toggling of Maps 3D camera UI controls
- Protect top camera controls and settings FAB from status bar insets
- Add Map3DSettingsControllerTest with 100% passing JVM unit tests
…ols showcase

Consolidates the stacked 3D Maps camera UI control improvements (PR #78,
PR #79, and PR #80) into a single cohesive branch with 100% 3-way parity
across Kotlin Views, Java Views, and Jetpack Compose.

- Quick Settings Overlay: Map3DQuickSettingsButton (Views) and
  Map3DQuickSettingsWidget (Compose) with session-scoped Map3DSettingsController.
- Dedicated UI Controls Showcase: Introduces UiControlsActivity across
  Kotlin, Java, and Compose calling the Maps 3D SDK directly
  (getUiControlSettings().setUiControlsPlacement(...)) with local UI state.
- SDK Standards: Removed internal reflection hacks into GoogleMap3D and
  LinearLayout layout mutations; standardized on ControlPlacement and
  ControlOrientation.VERTICAL.
- Stability & Robustness: Prevents Compose NoSuchFieldError on stripped
   fields, fixes top control clipping under toolbars, and adds
  comprehensive JVM unit tests in Map3DSettingsControllerTest.
…FieldError ()

- Add root compose_stability.conf treating com.google.android.gms.maps3d.** as stable
- Configure composeCompiler { stabilityConfigurationFiles } in ComposeDemos, common, and maps3d-compose
- Update DisposableEffect key in GoogleMap3D to boolean condition to avoid synthetic field lookups
- Apply spotless formatting across compose modules
@dkhawk
dkhawk merged commit 409773a into main Oct 14, 2026
12 checks passed
@dkhawk
dkhawk deleted the feat/quick-settings-widget branch October 14, 2026 23:28
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.

2 participants