Skip to content

feat: default 3D map UI controls to off outside UiControlsActivity and update 16.0.1 docs/catalogs - #89

Merged
dkhawk merged 5 commits into
mainfrom
chore/docs-and-catalog-16.0.1
Oct 23, 2026
Merged

dkhawk merged 5 commits into
mainfrom
chore/docs-and-catalog-16.0.1

Conversation

@dkhawk

@dkhawk dkhawk commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up documentation, sample catalog, and UI control default updates for play-services-maps3d:16.0.1 after merging PR #78, PR #84, and PR #87:

  • Default 3D Map UI Controls Behavior (Map3DSettings.kt & UiControlsActivity):
    • Defaults Map3DUiControls (zoom, tilt, rotate, compass, panVertical, panHorizontal) to false across general sample activities so samples and catalog screenshots keep an uncluttered 3D viewport (users can still toggle any UI control on at runtime via the Quick Settings dialog).
    • Keeps all 6 UI controls enabled by default specifically in the dedicated UI Controls sample (UiControlsActivity in ComposeDemos, kotlin-app, and java-app).
  • Shared Immersive Mode Helper (Utilities.kt):
    • Extracts Activity.enableImmersiveMode() into :Maps3DSamples:ApiDemos:common (com.example.maps3d.common) so SampleBaseActivity (Kotlin & Java), MapsLocalizationActivity, CameraControlsActivity, and UiControlsActivity share a single implementation.
  • Sample Catalogs & Thumbnails (SAMPLE_CATALOG.md & Module README.mds):
  • MIGRATION_GUIDE.md & Maps3DSamples/ApiDemos/migration_guide.md:
    • Updates the 0.2.2 -> 16.0.1 migration guide to cover both 16.0.1 fixes (JDK 21+ javac parameter annotation fix on Map3DControl and restored Jetpack Compose $stable fields), OnMap3DClickListener (event.location & event.placeId), the maps3dLoadingTintColor -> maps3dTintColor theme attribute rename, required mapMode in Map3DInitConfig.create(...), and zero-arg OnMarkerClickListener lambdas.
  • snippets/CATALOG.md & snippets/scripts/catalog_api.py:
    • Regenerates snippets/CATALOG.md to index Map Localization (MapLocalizationSnippets.kt / MapLocalizationSnippets.java) and UI Controls (UiControlSnippets.kt / UiControlSnippets.java) with exact line ranges and region tags (maps_android_3d_localization_*, maps_android_3d_ui_controls_*).
    • Updates catalog_api.py so parenthesized text in @SnippetGroup / @SnippetItem fields and multi-line string concatenations (" + ") are parsed without truncation.

@dkhawk
dkhawk marked this pull request as ready for review October 19, 2026 22:29
@dkhawk
dkhawk requested a review from kikoso October 19, 2026 22:29
@dkhawk
dkhawk force-pushed the chore/docs-and-catalog-16.0.1 branch from 809691c to c17d393 Compare October 20, 2026 20:11
@dkhawk
dkhawk requested a review from LoyalAbbas October 21, 2026 17:27

@kikoso kikoso 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.

Minor comments @dkhawk , but looks good! Once #90 is in, this one may need a rebase, since both touch the same playServicesMaps3d lines.

val compass: Boolean = true,
val panVertical: Boolean = true,
val panHorizontal: Boolean = true,
val zoom: Boolean = false,

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.

Quick question: is turning all the UI controls off by default meant for every sample, or mainly to get clean screenshots for the catalog? If it is intended, could we mention it in the PR description? With the docs: prefix it will not show up in the changelog, and people will see different behaviour in every sample.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, turning the UI controls off by default is intentional across the general samples to keep the 3D map viewport uncluttered (while keeping all 6 controls enabled by default in the dedicated UI Controls sample: UiControlsActivity in ComposeDemos, kotlin-app, and java-app, and still toggleable anytime via Quick Settings).

Good catch on the changelog — I've updated the PR title prefix from docs: to feat: so it is included in the changelog, and documented the behavior change in the PR description.

}
}

private fun enableImmersiveMode() {

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.

Just a random idea: we already have the same immersive mode setup in CameraControlsActivity and SampleBaseActivity, and this activity already depends on com.example.maps3d.common. Would it make sense to move it to a small extension there (e.g. Activity.enableImmersiveMode()) so the samples share one copy?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Great suggestion! Extracted Activity.enableImmersiveMode() into Utilities.kt in com.example.maps3d.common and updated MapsLocalizationActivity, CameraControlsActivity, UiControlsActivity, and SampleBaseActivity (Kotlin & Java) to share it in fbc0306.

if not success:
print("Failed to scale image.")
sys.exit(1)
# 3. Scale Image by 50% (cross-platform: ffmpeg / convert / sips)

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.

nit: the comment mentions convert, but we only try ffmpeg and then sips. Same in ComposeDemos/automation_script.py.

Suggested change
# 3. Scale Image by 50% (cross-platform: ffmpeg / convert / sips)
# 3. Scale Image by 50% (cross-platform: ffmpeg, falling back to sips on macOS)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in both Maps3DSamples/ApiDemos/catalog_automation.py and Maps3DSamples/ComposeDemos/automation_script.py in fbc0306.

@dkhawk
dkhawk force-pushed the chore/docs-and-catalog-16.0.1 branch from 757dcd5 to fce35e7 Compare October 22, 2026 23:33
@dkhawk dkhawk changed the title docs: update MIGRATION_GUIDE, sub-module version catalogs, and snippets CATALOG.md for 16.0.1 feat: default 3D map UI controls to off outside UiControlsActivity and update 16.0.1 docs/catalogs Oct 22, 2026
@dkhawk
dkhawk merged commit cb553e0 into main Oct 23, 2026
13 checks passed
@dkhawk
dkhawk deleted the chore/docs-and-catalog-16.0.1 branch October 23, 2026 14:11
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