mirror of
https://github.com/zhigang1992/reactNativeScreenAndroidTouchIssue.git
synced 2026-05-12 19:39:22 +08:00
chore: remove touch through view
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
package com.touchthroughviewissue;
|
package com.touchthroughviewissue;
|
||||||
|
|
||||||
import com.facebook.react.ReactActivity;
|
import com.facebook.react.ReactActivity;
|
||||||
import android.view.MotionEvent;
|
|
||||||
import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandlerInterface;
|
|
||||||
import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandler;
|
|
||||||
import com.facebook.react.ReactActivityDelegate;
|
import com.facebook.react.ReactActivityDelegate;
|
||||||
import com.facebook.react.ReactRootView;
|
import com.facebook.react.ReactRootView;
|
||||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||||
@@ -11,8 +8,6 @@ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
|||||||
|
|
||||||
public class MainActivity extends ReactActivity {
|
public class MainActivity extends ReactActivity {
|
||||||
|
|
||||||
private TouchThroughTouchHandler touchThroughTouchHandler = new TouchThroughTouchHandler();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the main component registered from JavaScript.
|
* Returns the name of the main component registered from JavaScript.
|
||||||
* This is used to schedule rendering of the component.
|
* This is used to schedule rendering of the component.
|
||||||
@@ -32,15 +27,4 @@ public class MainActivity extends ReactActivity {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public TouchThroughTouchHandler getTouchThroughTouchHandler() {
|
|
||||||
return touchThroughTouchHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean dispatchTouchEvent(MotionEvent ev) {
|
|
||||||
touchThroughTouchHandler.handleTouchEvent(ev);
|
|
||||||
|
|
||||||
return super.dispatchTouchEvent(ev);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user