Closed luvnish19 closed 4 years ago
I have that same problem.
same here, any workaround?
I'm having the same issue here
@osdnk please provide a solution for this. Everyone is in trouble.
Working properly in another project. I think that the problem is gesture-handler or reanimated conflict.
@akinmac002 Please share your source code. So that we could run as it is.
I solved my problem. I've detected the problem as linking on react-native-gesture-handler. https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html#android
Edit on MainActivity.java:
package com.swmansion.gesturehandler.react.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity {
@Override
protected String getMainComponentName() {
return "Example";
}
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate() {
+ return new ReactActivityDelegate(this, getMainComponentName()) {
+ @Override
+ protected ReactRootView createRootView() {
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
+ }
+ };
+ }
}
It works. Thanks a lot
Yes, this docs helped me https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html#android
Please close the issue
For me even it did not work even after doing all configuration as specified in installation document.
I added following code in index.js
of the app and it worked perfectly for me.
import 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import { gestureHandlerRootHOC } from 'react-native-gesture-handler'
AppRegistry.registerComponent(appName, () => gestureHandlerRootHOC(App));
I did all steps you guys @akinmac002 @azhararmar provided but swipe still does not work for me (
@alexeyvax It doesn't work for me too. Did you solve this issue ?
For me even it did not work even after doing all configuration as specified in installation document.
I added following code in
index.js
of the app and it worked perfectly for me.import 'react-native-gesture-handler'; import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; import { gestureHandlerRootHOC } from 'react-native-gesture-handler' AppRegistry.registerComponent(appName, () => gestureHandlerRootHOC(App));
This worked Thanks
Since I already had import 'react-native-gesture-handler'
on top of my index.js
, by simply adding the following fixed the issue, without any changes on MainActivity.java
:
AppRegistry.registerComponent(appName, () => gestureHandlerRootHOC(App));
Thanks, azhararmar.
For me even it did not work even after doing all configuration as specified in installation document.
I added following code in
index.js
of the app and it worked perfectly for me.import 'react-native-gesture-handler'; import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; import { gestureHandlerRootHOC } from 'react-native-gesture-handler' AppRegistry.registerComponent(appName, () => gestureHandlerRootHOC(App));
Thank you soooo much
For me even it did not work even after doing all configuration as specified in installation document.
I added following code in
index.js
of the app and it worked perfectly for me.import 'react-native-gesture-handler'; import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; import { gestureHandlerRootHOC } from 'react-native-gesture-handler' AppRegistry.registerComponent(appName, () => gestureHandlerRootHOC(App));
works for me,thanks azhararmar.
use import { GestureHandlerRootView } from 'react-native-gesture-handler';
is working with me
I append this example in my code and what I noticed that swipe gesture (slide) is not working. I only run this in Android device. HERE is my source code:
import React from 'react' import { Image, StyleSheet, Text, TouchableWithoutFeedback, View, TouchableOpacity } from 'react-native' import BottomSheet from 'reanimated-bottom-sheet'
export default class AnimatedBottomSheet extends React.Component { renderInner = () => (
)
renderHeader = () => (