react-native/ReactAndroid
Andrei Coman 79f3950d62 Fix timestamps on android touch events to use milliseconds, to be
Summary:
Landing D3528215 again, now that D3593884 has landed and makes that easier.
Copy-paste summary from previous diff:

So PanReponder.onPanResponderRelease/onPanResponderTerminate receive a
gestureState object containing a onPanResponderTerminate.vx/vy property. On
Android and iOS, they appear to be orders of magnitude different, which appear
to be due to the different scale of timestamps that are used when generating
touch events.

This pull request fixes the timestamps to be milliseconds on both platforms
(since I assume iOS is the more authoritative one, and is the one that
react-native-viewpager's vx thresholds written written to compare against.)

As far as I can tell, the RN code doesn't use the vx/vy properties, so they
should be okay. And looks like the RN code only cares about relative values of
startTimestamp/currentTimestamp/previousTimestamp though, so should be fine too.
it's quite possible there will be downstream android breakage with this change,
particularly for those who are already compensating for the RN discrepancy.

Reviewed By: foghina

Differential Revision: D3819761

fbshipit-source-id: fd2d85748ae6a9cde6af715aabb620f340c2220c
2016-09-06 04:58:51 -07:00
..
libs Add BUCK files 2016-01-22 16:20:13 +00:00
src Fix timestamps on android touch events to use milliseconds, to be 2016-09-06 04:58:51 -07:00
.npmignore Don't publish /ReactAndroid/build to npm, update version on master 2015-10-12 11:11:40 -07:00
DEFS Add annotation processor to create static ReactModule infos 2016-09-01 19:28:57 -07:00
DevExperience.md CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
README.md Add scripts for running tests locally 2016-05-04 08:58:18 -07:00
build.gradle Add annotation processor to create static ReactModule infos 2016-09-01 19:28:57 -07:00
gradle.properties E2e android 2016-04-13 08:20:05 -07:00
release.gradle CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00

README.md

Building React Native for Android

See the docs on the website.

Running tests

When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.