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

New gestures library - #11221

Merged
LukasPaczos merged 32 commits into
masterfrom
lp-gestures-lib-impl
Feb 27, 2018
Merged

LukasPaczos merged 32 commits into
masterfrom
lp-gestures-lib-impl

Conversation

@LukasPaczos

@LukasPaczos LukasPaczos commented Feb 16, 2018 •

Copy link
Copy Markdown
Contributor

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
LukasPaczos requested a review from tobrun February 16, 2018 13:18
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

@tobrun, this PR is ready for the review.

@tobrun tobrun left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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

tobrun commented Feb 27, 2018

Copy link
Copy Markdown
Member

Can this PR be retargeted to release-boba?

@LukasPaczos

LukasPaczos commented Feb 27, 2018 •

Copy link
Copy Markdown
Contributor Author

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
10 of 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