Skip to content

Update README.md #2176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: dependabot/gradle/tutorials/kotlin/MapWithMarker/androidx.core-core-ktx-1.16.0
Choose a base branch
from

Conversation

mccoystevens079-prog
Copy link

Thank you for opening a Pull Request!


Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

kikoso and others added 5 commits April 14, 2025 14:08
* chore: unified Kotlin and Java modules

* chore: unified resources

* chore: removed Kotlin

* chore: headers

* chore: headers

* chore: headers

* chore: headers

* chore: added insets

* chore: headers

* chore: renamed

* fix: Refactor map creation, centralize Map ID, add Kotlin boundary controls

This commit refactors how map fragments and Map IDs are handled across the Java and Kotlin demo applications, and introduces feature parity for boundary layer controls in the Kotlin demo.

Key changes include:

- **Programmatic Map Fragment Creation:**
    - Replaced static `<fragment>` map declarations with `<FrameLayout>` containers (`map_fragment_container`) in `data_driven_boundaries_demo.xml` and `data_driven_styling_demo.xml` layouts.
    - Modified `DataDrivenBoundariesActivity` and `DataDrivenDatasetStylingActivity` (Java & Kotlin) to instantiate `SupportMapFragment` programmatically using `SupportMapFragment.newInstance(mapOptions)`.
    - Map options (`GoogleMapOptions`) are now created with the dynamically retrieved Map ID before fragment creation.
      - this allows moving the Map ID out of the xml files

- **Centralized Map ID and Configuration Logic:**
    - Introduced `ApiDemoApplication` in both Java (`java-app`) and Kotlin (`kotlin-app`) modules.
    - This class centralizes Map ID retrieval, checking `BuildConfig.MAP_ID` first, then the `R.string.map_id` resource, providing a consistent source.
    - The Kotlin `ApiDemoApplication` also includes API Key validation on application startup.

- **Kotlin DataDrivenBoundaries Feature Enhancement:**
    - Added boundary layer selection controls (popup menu via `button_feature_type`) to the Kotlin `DataDrivenBoundariesActivity`, achieving parity with the Java version's functionality.
    - Implemented state management for toggling Locality, Administrative Area Level 1, and Country layers.
    - Added dynamic styling logic to apply/remove styles based on layer visibility.
    - Updated feature click handling for country selection, respecting layer activation state.

- **Miscellaneous Improvements:**
    - Added distinct demo titles (`demo_title_java`, `demo_title_kotlin`) in `strings.xml` for better app identification.
    - Updated resource references within Java/Kotlin activities for cleaner imports (e.g., `R.id...` instead of fully qualified names).

* chore: address various lint issues

* fix: explicitly bind checkboxes in the UI

---------

Co-authored-by: dkhawk <107309+dkhawk@users.noreply.github.com>
* chore: updated versions

* chore: updated snippets

* chore: updated tutorials java

* chore: updated tutorials java

* chore: permission

* chore: permission

* chore: added material
)

docs: Add EEA Terms of Service notice to README
@mccoystevens079-prog mccoystevens079-prog changed the base branch from main to dependabot/gradle/tutorials/kotlin/MapWithMarker/androidx.core-core-ktx-1.16.0 July 20, 2025 19:15
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