Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: react-native-gesture-handler #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidgovea
Copy link
Contributor

@davidgovea davidgovea commented Jun 3, 2019

Another staple react-native plugin -

This is a WIP -- it can't be merged as-is until this issue is resolved: electrode-io/electrode-native#1060 because it uses relaceInFile on Android (currently not supported)

RN-gesture-handler has a slightly involved installation process:

Update your MainActivity.java file (or wherever you create an instance of ReactActivityDelegate)

In our case, that means adding the edited createRootView to ElectrodeReactActivityDelegate.java

2 replacements are made:

  1. Adding the RNGestureHandlerEnabledRootView import
  2. @Overrideing the createRootView method:
    • The search uses a brittle matcher to find the end of the class: <four spaces>}\n}, which depends on code style/indentation. Not great..

We've been using this config for a few months (using a patched version of 0.30.x -- see info in the linked issue) -- I figured I'd at least get it up here to start a discussion.

Thank you!

@belemaire
Copy link
Member

Sorry for slight delay, I'll have a look tomorrow (Wednesday) to this PR and associated Electrode Native issue.

@davidgovea
Copy link
Contributor Author

Sounds great! I updated the POC code and added a PR for discussion: electrode-io/electrode-native#1197

Wouldn't use the word 'delay' 😆 -- it feels like there are multiple full-time maintainers here! Thanks for being so prompt & communicative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android missing replaceInFile directive
2 participants