Skip to content

Commit

Permalink
fallback to android.support.v4, because react-native-gesture-handler …
Browse files Browse the repository at this point in the history
…doesn't support androidx
  • Loading branch information
wuxudong committed May 21, 2019
1 parent 33cd73e commit ec88aa0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
13 changes: 13 additions & 0 deletions Example/android/app/src/main/java/com/example/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.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 {

Expand All @@ -12,4 +15,14 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "Example";
}

@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
2 changes: 1 addition & 1 deletion Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": "^16.8.6",
"react-native": "^0.59.4",
"react-native-charts-wrapper": "file:../",
"react-native-gesture-handler": "^1.1.0",
"react-native-gesture-handler": "^1.2.1",
"react-navigation": "3.8.1"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions Example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3100,14 +3100,14 @@ react-lifecycles-compat@^3.0.4:
resolved "http://registry.npm.taobao.org/react-lifecycles-compat/download/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"

"react-native-charts-wrapper@file:..":
version "0.5.2"
version "0.5.4"
dependencies:
prop-types "^15.5.10"
react "16.8.3"

react-native-gesture-handler@^1.1.0:
version "1.1.0"
resolved "http://registry.npm.taobao.org/react-native-gesture-handler/download/react-native-gesture-handler-1.1.0.tgz#2a7d545ad2e0ca23adce22b2af441ad360ecccee"
react-native-gesture-handler@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.2.1.tgz#9c48fb1ab13d29cece24bbb77b1e847eebf27a2b"
dependencies:
hoist-non-react-statics "^2.3.1"
invariant "^2.2.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.github.wuxudong.rncharts.listener;

import androidx.annotation.NonNull;

import android.support.annotation.NonNull;
import android.view.MotionEvent;

import com.facebook.react.bridge.Arguments;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.content.Context;
import android.graphics.drawable.Drawable;
import androidx.core.content.res.ResourcesCompat;
import android.support.v4.content.res.ResourcesCompat;
import android.text.TextUtils;
import android.widget.TextView;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/wuxudong/react-native-charts-wrapper.git"
},
"version": "0.5.4",
"version": "0.5.5",
"description": "A react-native charts support both android and ios.",
"author": "wuxudong",
"license": "MIT",
Expand Down

0 comments on commit ec88aa0

Please sign in to comment.