implement MotionView.eventTime and VelocityTracker

This is needed to make androidx ViewPager work with touch input
This commit is contained in:
Julian Winkler
2024-02-25 17:41:26 +01:00
parent 8dafa41ea9
commit bcf252d3a6
6 changed files with 52 additions and 19 deletions

View File

@@ -83,7 +83,7 @@ void set_up_handle_cache(JNIEnv *env)
handle_cache.paint.getColor = _METHOD(handle_cache.paint.class, "getColor", "()I");
handle_cache.motion_event.class = _REF((*env)->FindClass(env, "android/view/MotionEvent"));
handle_cache.motion_event.constructor = _METHOD(handle_cache.motion_event.class, "<init>", "(IIFF)V");
handle_cache.motion_event.constructor = _METHOD(handle_cache.motion_event.class, "<init>", "(IIFFJ)V");
handle_cache.canvas.class = _REF((*env)->FindClass(env, "android/graphics/Canvas"));
handle_cache.canvas.constructor = _METHOD(handle_cache.canvas.class, "<init>", "(JJ)V");