chore: add react-navigation-fluid-transitions

This commit is contained in:
Kyle Fang
2019-05-12 10:12:11 +08:00
parent 5404b766a4
commit adfcc78bd0
8 changed files with 217 additions and 34 deletions

View File

@@ -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"])

View File

@@ -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;

View File

@@ -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()
);

View File

@@ -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'