mirror of
https://github.com/zhigang1992/reactNativeScreenAndroidTouchIssue.git
synced 2026-05-08 07:52:49 +08:00
chore: add react-navigation-fluid-transitions
This commit is contained in:
@@ -138,6 +138,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':react-native-gesture-handler')
|
||||
implementation project(':react-native-touch-through-view')
|
||||
implementation project(':react-native-screens')
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
|
||||
@@ -4,6 +4,10 @@ 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.ReactRootView;
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||
|
||||
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
@@ -18,6 +22,15 @@ public class MainActivity extends ReactActivity {
|
||||
return "touchThroughViewIssue";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReactActivityDelegate createReactActivityDelegate() {
|
||||
return new ReactActivityDelegate(this, getMainComponentName()) {
|
||||
@Override
|
||||
protected ReactRootView createRootView() {
|
||||
return new RNGestureHandlerEnabledRootView(MainActivity.this);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public TouchThroughTouchHandler getTouchThroughTouchHandler() {
|
||||
return touchThroughTouchHandler;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.touchthroughviewissue;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
|
||||
import com.rome2rio.android.reactnativetouchthroughview.TouchThroughViewPackage;
|
||||
import com.swmansion.rnscreens.RNScreensPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
@@ -25,6 +26,7 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(),
|
||||
new RNGestureHandlerPackage(),
|
||||
new TouchThroughViewPackage(),
|
||||
new RNScreensPackage()
|
||||
);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
rootProject.name = 'touchThroughViewIssue'
|
||||
include ':react-native-gesture-handler'
|
||||
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
|
||||
include ':react-native-touch-through-view'
|
||||
project(':react-native-touch-through-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-touch-through-view/android')
|
||||
include ':react-native-screens'
|
||||
|
||||
Reference in New Issue
Block a user