Revamp touch event dispatching methods
Summary: There are two methods in ReactRootView to handle touch events "onInterceptTouchEvent" and "onTouchEvent", for Venice we have ReactSurfaceView inherits ReactRootView but the implementation for above 2 touch handling methods still calls into it's super implementation which uses the bridge. In this diff we make ReactSurfaceView inherits ReactRootView's "dispatchJSTouchEvent" and "dispatchJSPointerEvent". So that Venice has separate implementation for touch events handling. Changelog: [Android][Changed] - Revamp touch event dispatching methods Reviewed By: fkgozali, JoshuaGross Differential Revision: D36629466 fbshipit-source-id: fb7c5950afe6249d22edd3fac3fa5d3b83b3af84
This commit is contained in:
Родитель
ad76eb368e
Коммит
089ff4555a
|
@ -338,7 +338,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|||
super.requestChildFocus(child, focused);
|
||||
}
|
||||
|
||||
private void dispatchJSPointerEvent(MotionEvent event) {
|
||||
protected void dispatchJSPointerEvent(MotionEvent event) {
|
||||
if (mReactInstanceManager == null
|
||||
|| !mIsAttachedToInstance
|
||||
|| mReactInstanceManager.getCurrentReactContext() == null) {
|
||||
|
@ -361,7 +361,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|||
}
|
||||
}
|
||||
|
||||
private void dispatchJSTouchEvent(MotionEvent event) {
|
||||
protected void dispatchJSTouchEvent(MotionEvent event) {
|
||||
if (mReactInstanceManager == null
|
||||
|| !mIsAttachedToInstance
|
||||
|| mReactInstanceManager.getCurrentReactContext() == null) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче