-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore: Implement edge-to-edge UI #1574
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
Merged
Merged
Conversation
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
Contributor
Code Coverage
|
4836b9b to
03d7f44
Compare
kikoso
reviewed
Aug 28, 2025
library/src/main/java/com/google/maps/android/heatmaps/HeatmapTileProvider.kt
Outdated
Show resolved
Hide resolved
The `@Deprecated` annotation has been updated to the Kotlin syntax and now includes a `ReplaceWith` expression to provide IDE quick-fix support. Additionally, new unit tests using Google Truth have been added for the `Point` class to verify its construction and inheritance.
This commit migrates the `Gradient` and `WeightedLatLng` classes and their corresponding tests from Java to idiomatic Kotlin. This conversion is part of the larger effort to modernize the library and prepare it for Kotlin Multiplatform (KMP) compatibility. Key changes include: - `WeightedLatLng` is now a `data class` with a private primary constructor to ensure correct instantiation while providing the benefits of auto-generated methods. The `@ExposedCopyVisibility` annotation has been added to maintain binary compatibility for the `copy()` method. - `Gradient` has been converted to a Kotlin class, using `@JvmOverloads` for constructor compatibility and a `companion object` for its static helper method. - The `internal` visibility of a method in `Gradient` was changed to `public` to ensure visibility to Java classes during the mixed-language phase of the migration. - Unit tests for both classes have been ported to Kotlin, using the Truth assertion framework.
This commit completes the migration of the `heatmaps` package to Kotlin by porting the final and most complex class, `HeatmapTileProvider`. This conversion modernizes the class by introducing several idiomatic Kotlin features and improves its design by refactoring a key data structure. Key changes include: - The `HeatmapTileProvider` and its `Builder` are now written in Kotlin. - The `getMaxValue()` method was refactored to use a `Map` with a type-safe `Vector` key instead of the Android-specific `LongSparseArray`, improving readability and moving closer to KMP compatibility. - A new test suite was created from scratch for the provider, as none existed previously. This improves the code coverage and reliability of the module. - Necessary adjustments were made to the demo application to support the newly ported Kotlin class.
Updates the copyright headers in the test files that were created during the Kotlin porting process. - Corrects the copyright year to 2025. - Corrects the company name from "Google Inc." to "Google LLC".
Updates the copyright headers in the `heatmaps` package source and test files. - Corrects the copyright year to 2025. - Corrects the company name from "Google Inc." to "Google LLC".
This commit implements edge-to-edge UI for the demo application. Changes include: - Updating the app theme to be edge-to-edge. - Applying window insets to the base and main activities. - Adding a separate styles.xml for API 27+ to handle display cutouts.
This commit updates the copyright headers in the following files: - demo/build.gradle.kts - demo/src/main/java/com/google/maps/android/utils/demo/BaseDemoActivity.java - demo/src/main/java/com/google/maps/android/utils/demo/MainActivity.java - demo/src/main/res/values/styles.xml - demo/src/main/res/values-v27/styles.xml
ff5b8f3 to
4afaedd
Compare
….Builder This commit replaces the `check` function with `require` for validating input data in the `HeatmapTileProvider.Builder`. Using `require` is more idiomatic for precondition checks, throwing an `IllegalArgumentException` which is more appropriate in this context than the `IllegalStateException` thrown by `check`.
This commit updates `HeatmapTileProviderTest` to expect an `IllegalArgumentException` instead of `IllegalStateException` when building a provider with no data. It also cleans up unused exception variables in catch blocks.
kikoso
approved these changes
Aug 28, 2025
Collaborator
kikoso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! One small step for humankind, one big step for edge-to-edge users
Contributor
|
🎉 This PR is included in version 3.16.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Contributor
|
🎉 This PR is included in version 3.16.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
This commit implements edge-to-edge UI for the demo application. Changes include: - Updating the app theme to be edge-to-edge. - Applying window insets to the base and main activities. - Adding a separate styles.xml for API 27+ to handle display cutouts.