Closed kaiwen-zhang-ck closed 5 years ago
I can confirm. I'm having the same issue.
react-native: 0.58.6 react-native-gesture-handler: 1.0.17
Ok, I just forgot the Android Setup https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html#android
Now, it's working and I feel like an idiot ¯_(ツ)_/¯
@mekanics This is great. Android must change the activity to the following in order to work.
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);
+ }
+ };
+ }
}
Ok, I just forgot the Android Setup https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html#android
Now, it's working and I feel like an idiot ¯(ツ)/¯
Updated Link: https://docs.swmansion.com/react-native-gesture-handler/docs/#android
I tried copying the example, but on 0.58.6 does not work on Android. iOS is fine. To reproduce
my package.json
how is how i called it, this is from pan scroll example
View loads and no error, but circle will not move from panning. Any ideas?