feat: Modernize Android samples UI, edge-to-edge insets, and demo verification improvements - #2389
Draft
dkhawk wants to merge 1 commit into
Draft
feat: Modernize Android samples UI, edge-to-edge insets, and demo verification improvements#2389dkhawk wants to merge 1 commit into
dkhawk wants to merge 1 commit into
Conversation
| map = googleMap | ||
| // Center map camera on Pegman's location with street-level zoom | ||
| googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerPosition, 16f)) | ||
| googleMap.setOnMarkerDragListener(this@SplitStreetViewPanoramaAndMapDemoActivity) |
| map = googleMap; | ||
| // Center map camera on Pegman's location with street-level zoom | ||
| googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerPosition, 16f)); | ||
| googleMap.setOnMarkerDragListener(SplitStreetViewPanoramaAndMapDemoActivity.this); |
dkhawk
force-pushed
the
fix/snippets-null-safety
branch
2 times, most recently
from
August 18, 2026 20:47
e050838 to
692462e
Compare
… sample reliability - Edge-to-Edge & System Insets: * Updated SamplesBaseActivity (Kotlin & Java) to safely apply window insets to root containers and programmatic layouts without double-insetting nested fragments. * Corrected constraints and margins across all demo layouts. - Split Street View Panorama & Map Demo: * Added Material 3 "My Location" Floating Action Button powered by FusedLocationProviderClient (PRIORITY_HIGH_ACCURACY) with runtime permission handling. * Added dismissible instruction banner explaining bidirectional sync. * Synchronized Pegman marker heading and camera tracking between Map and Panorama. * Updated initial camera framing centered on Sydney Harbour with rich docstrings. - Snapshot Demo Modernization (SnapshotDemoActivity): * Redesigned UI with Material 3 cards for capture controls, options, and preview. * Added custom vector icons (ic_camera, ic_clear) with Apache 2.0 license headers. * Updated initial camera focal point to Venice (45.4371, 12.3345, zoom 16f). * Optimized portrait and landscape layouts (layout/ and layout-land/). - Advanced Markers, Datasets, & Map Overlays: * AdvancedMarkersDemoActivity: Added custom framed badge iconView with Android green border and LatLngBounds camera initialization enclosing all Southeast Asia markers. * GroundOverlayDemoActivity: Configured LatLngBounds viewport framing and 0.2f initial transparency so underlying map details remain visible. * DataDrivenDatasetStylingActivity: Added LatLngBounds with padding to frame dataset features across Kotlin and Java demos. - Lite List Demo Modernization (LiteListDemoActivity): * Redesigned list rows with Material 3 MaterialCardView tiles, rounded corners, elevation, and styled headers with location icon. * Added ic_view_list and ic_view_grid vector drawables. * Wired MaterialToolbar to support switching between Linear List and 2-column Grid modes. - Location Source & Core Demos: * LocationSourceDemoActivity: Fixed toolbar title to display "Location Source Demo". * Verified PolygonDemoActivity, PolylineDemoActivity, and CircleDemoActivity on device. - Wear OS Sample (com.example.wearos): * Added safe exception handling around AmbientModeSupport.attach() in MainActivity and AmbientActivity (Kotlin & Java) to guard against missing wearable shared libraries. * Verified circular map and interactive marker info windows on Wear OS emulator. - Compose (FireMarkers), Snippets, & Tutorials: * FireMarkers: Refactored marker position animations with rememberUpdatedMarkerState. * Snippets: Fixed null safety and field initialization in KML.kt and Multilayer.kt. * Tutorials: Modernized string templates, test runners, and dependencies. * Lint & Resources: Resolved lint warnings, replaced hardcoded strings with resource entries, and specified explicit Locales in String.format.
dkhawk
force-pushed
the
fix/snippets-null-safety
branch
from
August 18, 2026 20:50
692462e to
1332bdb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR modernizes the Google Maps Platform Android ApiDemos suite with Material 3 components, comprehensive edge-to-edge window inset handling, dark/light theme contrast fixes, state retention bugfixes, and real-time telemetry improvements.
Key Changes
CameraClampingDemoActivity):RangeSlider([2.0, 21.0], step0.5).MaterialButtonToggleGroupfor Adelaide, Pacific, and Reset bounds with visible active states.GoogleMap.setOnCameraMoveListener.IllegalStateExceptionbounds mismatch crash on Reset Zoom.SaveStateDemoActivity):MarkerDemoActivity):CameraDemoActivity):EventsDemoActivity):OnCameraMoveListenertelemetry tracking.LayersDemoActivity):LatLng(-33.8688, 151.2093), zoom 16.5, tilt 40°) so 3D buildings, traffic overlays, and indoor floorplans are immediately visible.MaterialCheckBox.SamplesBaseActivityacross both Kotlin and Java samples.