Skip to content

Conversation

@barbeau
Copy link
Collaborator

@barbeau barbeau commented Jun 18, 2020

As mentioned in #750, we currently support clicking on info windows for markers in the library, but not long clicking. This PR implements long clicking as well.

BREAKING CHANGE: Note that this could be considered a breaking change because ClusterRenderer is a public interface and may be used outside of the library if apps implemented their own renderer. Also, if apps were doing map.setOnInfoWindowLongClickListener() on their own this implementation will break that behavior and force them to use the collection info window long click listener, similar to how info window click listeners are currently handled (see the Migration Guide).

I've tested this in the demo app with:

        mClusterManager.getMarkerCollection().setOnInfoWindowLongClickListener(marker ->
                Toast.makeText(ClusteringDemoActivity.this,
                        "Info window long pressed.",
                        Toast.LENGTH_SHORT).show());

...and it works, although I can't add the above code in a PR until this is released and we bump the demo app version.


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)
  • Will this cause breaking changes to existing Java or Kotlin integrations? If so, ensure the commit has a BREAKING CHANGE footer so when this change is integrated a major version update is triggered. See: https://www.conventionalcommits.org/en/v1.0.0/

Fixes #750 🦕

BREAKING CHANGE: Note that this could be considered a breaking change because `ClusterRenderer` is a `public interface` and may be used outside of the library if apps implemented their own renderer. Also, if apps were doing `map.setOnInfoWindowLongClickListener()` on their own this implementation will break that behavior and force them to use the collection info window long click listener, similar to how info window click listeners are currently handled (see the [Migration Guide](https://github.com/googlemaps/android-maps-utils#adding-a-custom-info-window).

Closes #750
@barbeau barbeau requested a review from arriolac June 18, 2020 18:03
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 18, 2020
@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

Merging #752 into master will decrease coverage by 0.28%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #752      +/-   ##
==========================================
- Coverage   39.48%   39.20%   -0.29%     
==========================================
  Files          71       71              
  Lines        4047     4076      +29     
  Branches      606      609       +3     
==========================================
  Hits         1598     1598              
- Misses       2346     2375      +29     
  Partials      103      103              
Impacted Files Coverage Δ
...google/maps/android/clustering/ClusterManager.java 0.00% <0.00%> (ø)
...ndroid/clustering/view/DefaultClusterRenderer.java 0.00% <0.00%> (ø)
...google/maps/android/collections/MarkerManager.java 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdd6543...4ac0d6b. Read the comment docs.

@googlemaps googlemaps deleted a comment from bigbite95110 Jun 19, 2020
@barbeau barbeau merged commit 8a3fc01 into master Jun 19, 2020
@barbeau barbeau deleted the sean/info-window-long-click-listener branch June 19, 2020 21:16
googlemaps-bot pushed a commit that referenced this pull request Jun 19, 2020
# [2.0.0](v1.3.3...v2.0.0) (2020-06-19)

* feat!: Add support for setOnInfoWindowLongClickListener() for Markers (#752) ([8a3fc01](8a3fc01)), closes [#752](#752) [#750](#750)

### BREAKING CHANGES

* Note that this could be considered a breaking change because `ClusterRenderer` is a `public interface` and may be used outside of the library if apps implemented their own renderer. Also, if apps were doing `map.setOnInfoWindowLongClickListener()` on their own this implementation will break that behavior and force them to use the collection info window long click listener, similar to how info window click listeners are currently handled (see the [Migration Guide](https://github.com/googlemaps/android-maps-utils#adding-a-custom-info-window).
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

barbeau added a commit that referenced this pull request Jun 22, 2020
Follow up to implementing the feature in #752.
kikoso pushed a commit that referenced this pull request Jan 5, 2023
Follow up to implementing the feature in #752.
kikoso pushed a commit that referenced this pull request Jan 13, 2023
Follow up to implementing the feature in #752.
wangela pushed a commit that referenced this pull request Jan 13, 2023
Follow up to implementing the feature in #752.

Co-authored-by: Enrique López Mañas <eenriquelopez@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for setOnInfoWindowLongClickListener()

4 participants