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

New gestures library #11221

Merged
merged 32 commits into from
Feb 27, 2018
Merged

New gestures library #11221

merged 32 commits into from
Feb 27, 2018

Conversation

LukasPaczos
Copy link
Member

@LukasPaczos LukasPaczos commented Feb 16, 2018

Closes #10016.

This PR introduces new gestures handling implementation using mapbox-gestures-android library.

Tagging as work in progress until:

  • test whether camera listeners fire correctly
  • test whether previously settable values are still taken into account
  • remove redundant classes from the previous implementation
  • documentation and code cleanup

In the meantime, please feel free to run our internal app and give any feedback you might have about gestures composure, thresholds, an order of firing and general behavior so we can tweak them properly before the first iteration.

/cc @mapbox/maps-android

@LukasPaczos LukasPaczos added Android Mapbox Maps SDK for Android in progress labels Feb 16, 2018
@LukasPaczos LukasPaczos added this to the android-v6.0.0 milestone Feb 16, 2018
LukasPaczos and others added 26 commits February 27, 2018 13:18
robolectric : '3.5.1',
timber : '4.5.1',
okhttp : '3.9.1'
mapboxGestures : '0.1.0-20180219.142215-11',
Copy link
Member Author

Choose a reason for hiding this comment

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

Noting that we rely on a particular SNAPSHOT of the gestures library at the moment. This will need to change when the final release of 6.0.0 comes, synced with the first stable release of the gestures library.

@LukasPaczos
Copy link
Member Author

@tobrun, this PR is ready for the review.

Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

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

Looks great!

<dimen name="mapbox_minimum_scale_span_when_rotating">100dp</dimen>

<!--Minimum angular velocity required to start rotation animation-->
<dimen name="mapbox_minimum_angular_velocity">0.025dp</dimen>
Copy link
Member

Choose a reason for hiding this comment

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

are above public resources (is a user suppose to override these?)? if yes, these should be exposed in public.xml

Copy link
Member Author

Choose a reason for hiding this comment

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

Following up on this in #11331.

context.getResources().getDimension(R.dimen.mapbox_minimum_angular_velocity)
));
gesturesManager.setShoveGestureListener(new ShoveGestureListener());
gesturesManager.setMultiFingerTapGestureListener(new TapGestureListener());
Copy link
Member

Choose a reason for hiding this comment

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

not actionable for now, but for future iterations is to make the initialisation code of the gesture library more discoverable? What I mean with that is that user atm needs to copy paste the code while with something as a builder/factory they could discover the api through specific components and code completion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Following up on this in #11331.

@tobrun
Copy link
Member

tobrun commented Feb 27, 2018

Can this PR be retargeted to release-boba?

@LukasPaczos
Copy link
Member Author

LukasPaczos commented Feb 27, 2018

I'd rather 🍒 pick it to the release branch, not to drag whole master with this PR.

@LukasPaczos LukasPaczos merged commit 7905bd6 into master Feb 27, 2018
@LukasPaczos LukasPaczos deleted the lp-gestures-lib-impl branch February 27, 2018 14:51
LukasPaczos added a commit that referenced this pull request Feb 27, 2018
* [android] new gesture library - added SNAPSHOT dependency

* [android] new gesture library - cleaned up redundant classes

* [android] new gesture library - limiting scale when rotating

* [android] new gesture library - shove gesture filtering

* [android] new gesture library - increase rotation threshold when scaling

* [android] new gesture library - minimum angular velocity

* [android] new gesture library - exposed gestures execution listeners

* [android] new gesture library - notifying new listeners tests

* [android] new gesture library - removed tracking setting

* [android] new gesture library - resetting focal point with every scale/rotate callback

* [android] new gesture library - fixed camera change dispatcher callbacks

* [android] new gesture library - cancel velocity animations in maps onStop()

* [android] new gesture library - extracted telemetry pushes to a method

* [android] new gesture library - deprecated onScrollListener

* [android] new gesture library - unified shove listener name

(cherry picked from commit 7905bd6)
LukasPaczos added a commit that referenced this pull request Feb 27, 2018
* [android] new gesture library - added SNAPSHOT dependency

* [android] new gesture library - cleaned up redundant classes

* [android] new gesture library - limiting scale when rotating

* [android] new gesture library - shove gesture filtering

* [android] new gesture library - increase rotation threshold when scaling

* [android] new gesture library - minimum angular velocity

* [android] new gesture library - exposed gestures execution listeners

* [android] new gesture library - notifying new listeners tests

* [android] new gesture library - removed tracking setting

* [android] new gesture library - resetting focal point with every scale/rotate callback

* [android] new gesture library - fixed camera change dispatcher callbacks

* [android] new gesture library - cancel velocity animations in maps onStop()

* [android] new gesture library - extracted telemetry pushes to a method

* [android] new gesture library - deprecated onScrollListener

* [android] new gesture library - unified shove listener name

(cherry picked from commit 7905bd6)
@LukasPaczos LukasPaczos mentioned this pull request Mar 2, 2018
23 tasks
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