From 55e3aa3c400c8b2c8c0d4ee38f08b15ab53307bf Mon Sep 17 00:00:00 2001 From: Alexander Melanchenko Date: Wed, 2 Aug 2017 18:01:40 +0300 Subject: [PATCH] add support for RN 0.47+ --- README.md | 3 +++ android/src/main/java/com/bgimage/BgImagePackage.java | 5 +++-- package.json | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f7a8bec..50e1504 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ Renders your android res/drawable* images in tiling mode (repeated background) i - run: **npm install --save react-native-bgimage** - run: **react-native link react-native-bgimage** (or link it manually) +For React Native version < 0.47.x you must use older not compatible version +use **npm install react-native-bgimage@1.3.0** to specify it + ### To manual link - add to **android/settings.gradle** : diff --git a/android/src/main/java/com/bgimage/BgImagePackage.java b/android/src/main/java/com/bgimage/BgImagePackage.java index ef0e828..70f045b 100644 --- a/android/src/main/java/com/bgimage/BgImagePackage.java +++ b/android/src/main/java/com/bgimage/BgImagePackage.java @@ -13,10 +13,11 @@ public class BgImagePackage implements ReactPackage { - @Override +// this is never used anymore since RN 0.47 + /*@Override public List> createJSModules() { return Collections.emptyList(); - } + }*/ @Override public List createViewManagers(ReactApplicationContext reactContext) { diff --git a/package.json b/package.json index d1ba8fd..1fc60aa 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "react-native-bgimage", - "version": "1.3.0", + "version": "1.4.0", "description": "Background image view for react native", "keywords": [ "react", "react native", "react-native", "react-component", "image", "background" ], "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "npm pack && mv react-native-bgimage-1.2.0.tgz .. && cd ../.. && npm i react-native-bgimage" + "build": "npm pack && mv react-native-bgimage-1.4.0.tgz .. && cd ../.. && npm i react-native-bgimage" }, "repository": { "type": "git",