Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[android] - only dispatch events if not handled by MarkerView #8447

Merged
merged 1 commit into from
Mar 17, 2017

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Mar 17, 2017

Closes #8444

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 17, 2017
@tobrun tobrun added this to the android-v5.0.0 milestone Mar 17, 2017
@tobrun tobrun self-assigned this Mar 17, 2017
@tobrun tobrun mentioned this pull request Mar 17, 2017
@tobrun
Copy link
Member Author

tobrun commented Mar 17, 2017

Retesting this and we actually need to be able to handle touches that are handled by the child views.. this makes starting a pan on a MarkerView impossible.

@tobrun tobrun added the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Mar 17, 2017
@tobrun
Copy link
Member Author

tobrun commented Mar 17, 2017

Will need to re implement the OnClick logic with OnTouch to be able to control the flag returned to MarkerViewContainer.

@tobrun tobrun removed this from the android-v5.0.0 milestone Mar 17, 2017
@tobrun
Copy link
Member Author

tobrun commented Mar 17, 2017

8f38a77 fixes the issue, want to review @Guardiola31337?

@tobrun tobrun removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Mar 17, 2017
@tobrun tobrun added this to the android-v5.0.0 milestone Mar 17, 2017
select(marker, v, adapter);
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why using switch instead if? There is only one case (MotionEvent.ACTION_UP).

Copy link
Member Author

@tobrun tobrun Mar 17, 2017

Choose a reason for hiding this comment

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

Comment fixed in 430f9f6

use onTouch listener to ignore dispatching action up events to MapView when they are already handled by MarkerView.
Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

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

👍

@tobrun tobrun merged commit 09d7685 into release-ios-v3.5.0-android-v5.0.0 Mar 17, 2017
@tobrun tobrun deleted the 8444-markerview-click branch March 17, 2017 14:23
tobrun added a commit that referenced this pull request Mar 30, 2017
tobrun added a commit that referenced this pull request Mar 30, 2017
* Revert "[android] - only dispatch events if not handled by MarkerView (#8447)"

This reverts commit 09d7685.

* Revert "[android] - move touch handling of MarkerViews back to View#setOnClickListener. Workaround panning issue by dispatching touch events to the parent ViewGroup. (#8272)"

This reverts commit 1693b38.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants