Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Double tap to zoom #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ecgreb
Copy link
Contributor

@ecgreb ecgreb commented May 2, 2014

Per Android guidelines, double touch drag up should decrease content scale and double touch drag down should increase content scale. This is also the behavior in the official Google Maps Android application.

http://developer.android.com/design/patterns/gestures.html

This change set also adds double tap to zoom functionality using Animator#animateZoom(...).

ecgreb added 2 commits May 2, 2014 16:27
Per Android guidelines, double touch drag up should decrease content scale and double touch drag down should increase content scale.

This is also the behavior in the official Google Maps Android application.

http://developer.android.com/design/patterns/gestures.html
@stleusc
Copy link
Contributor

stleusc commented May 3, 2014

Like that!

@hjanetzek
Copy link
Member

@ecgreb I realized that gmaps recently switched drag-zoom behaviour. It was probably a hidden feature there for most people before the general ui gesture... Still need to get used to it. Commited with slight changes to double-tap zoom. Thanks!

@stleusc
Copy link
Contributor

stleusc commented May 5, 2014

tried out the latest commit for double tap.
It acts very funny and jerky.
Sometimes it zooms, sometimes it seems like the map just jumps.

Very odd behavior.

@hjanetzek
Copy link
Member

@stleusc do you see any difference to the original commit? or could you provide a test case for 'funny, jerky behaviour' ? :)
There are two things with the gesture that are still suboptimal: The minimal drag allowed to switch to drag-zoom mode might need to be increased and second the animator should not stop when the user touches again - Other than that it works properly for me.

@hjanetzek
Copy link
Member

oh, seems one commit went to nirvana. just commited the check for minimal double-tap-drag distance, which makes triggering double-tap zoom animation more reliable.

@stleusc
Copy link
Contributor

stleusc commented May 6, 2014

@hjanetzek it was funny, the map behaved great on my Nexus 7 2013 tablet. On my Galaxy S4 it almost did not work.
Tried your latest fix on my phone now. Looks good...

@stleusc
Copy link
Contributor

stleusc commented May 6, 2014

@hjanetzek now I know what my issue is, maybe you can add one or two features to the double tap zoom. What I have is a 'follow me' mode of the map, keeping my location centered. When this is on and I double tap on the map it starts zooming, moving my location out of the center, then I cancel that and center my location again.

Request
Feature to switch double-tap zoom to either zoom around tap location (currently like that) or zoom around center of map, keeping this centered!
I need to be able to switch the two modes while the map is showing.

@stleusc
Copy link
Contributor

stleusc commented May 6, 2014

@hjanetzek
Another request that kinda fits in here (though not double tap, but still zoom)
Request
Feature to allow to disable zoom & drag map. Meaning
a) allow 2 finger zoom AND drag/move map at the same time
b) allow 2 finger zoom but dragging both fingers to move map will not move it

Good example is current Google Maps app.
for a) move map around and then do 2 finger zoom and then drag both fingers to move map
for b) center map on you and THEN do the above and you will see that the map does not move

Same procedure can be used to test the double tap zoom btw....

@hjanetzek
Copy link
Member

@stleusc please open a separate issue for this, take the time to make a pull request or at least a diff to make it easier to see your modifications.

@stleusc
Copy link
Contributor

stleusc commented May 6, 2014

tried again ;) #63 should be it.

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

Successfully merging this pull request may close these issues.

3 participants