Skip to content
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

Android gestures #688

Closed
8 tasks done
devemux86 opened this issue Sep 18, 2015 · 6 comments
Closed
8 tasks done

Android gestures #688

devemux86 opened this issue Sep 18, 2015 · 6 comments
Milestone

Comments

@devemux86
Copy link
Collaborator

  • Scroll (pan)
  • Scale
  • Scale with focus
  • Quick scale (double tap + swipe)
  • Fling (kinetic scroll)
  • Double tap (zoom with focus)
  • Tap (overlay)
  • Long press (overlay)
@schildbach
Copy link
Contributor

Here are some takeaways from my PR #687:

  • We should remove animations from MapViewPosition entirely. UI animations are very specific to the platform in use. They have their specific look and feel and usually there are already classes to support them. Also threading is handled differently: e.g. on Android you'd prefer to use a Handler rather than spawning a thread.
  • The remaining jaggies are due to the fact MapViewPosition keeps a byte zoomLevel and a float scaleFactor separately. That makes it difficult to get simultaneous zooming and panning right. We should think about getting rid of the zoomLevel and only use one single float scaleFactor (maybe rename it to zoomFactor). Of course we can still keep the old methods that deal with the byte values for backwards compatibility.

@devemux86
Copy link
Collaborator Author

  1. Not a bad idea, though we'll need to transfer functionality to android / awt modules.
  2. Moving from byte to float, meaning like steplessly variable zoom levels Allow for steplessly variable zoom level #75 ?

@devemux86
Copy link
Collaborator Author

With 94623e5 I pushed a set of additions / improvements / fixes with the Mapsforge gestures overhaul.

  • New gestures: fling, quick scale
  • Improved 'scale with focus'
  • Fixed 'double tap'

Any artifacts were mostly eliminated with proper handling of scroll and scale gestures interaction.

@devemux86
Copy link
Collaborator Author

Thilo had expressed some thoughts some years ago, regarding the panning threshold we had active until recently.

How do you find the new Mapsforge gesture handling, do we need a panning threshold?

@schildbach
Copy link
Contributor

I believe the stock GestureDetector handles this all for us already, including quirks for old devices with a bad screen digitizer.

All my test devices certainly do not need an (additional) panning threshold.

@devemux86
Copy link
Collaborator Author

@schildbach thanks for the feedback.

Those were indeed old Android days, just wanting to make sure that now we implemented all the right way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants