Skip to content

Commit

Permalink
add support for RN 0.47+
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnd committed Aug 2, 2017
1 parent 335dc55 commit 55e3aa3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]** to specify it

### To manual link

- add to **android/settings.gradle** :
Expand Down
5 changes: 3 additions & 2 deletions android/src/main/java/com/bgimage/BgImagePackage.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

public class BgImagePackage implements ReactPackage {

@Override
// this is never used anymore since RN 0.47
/*@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
}*/

@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 55e3aa3

Please sign in to comment.