A image magic module for react native
Java JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
android
.gitignore
LICENSE
README.md
index.android.js
package.json add blur Feb 9, 2016

README.md

react-native-imagewand

React native image wand view for android. Enabling you to do instagram like effects to images

Installation

npm i --save react-native-imagewand

Add it to your android project

  • In android/settings.gradle
...
include ':react-native-imagewand'
project(':react-native-imagewand').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-imagewand/android')
  • In android/app/build.gradle
dependencies {
  ...
  ...
  compile project(':react-native-imagewand')
}
  • register module (in MainActivity.java)
import com.reactImageWand.*;  // <--- import

public class MainActivity extends ReactActivity {
  ......
  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new RNImageWandPackage()     // <------ add here
    );
  }
  ......
}

Example

var ImageWand = require('react-native-imagewand');

var Example = React.createClass({

  render: function() {
    return (
      <ImageWand
        onImageInfo={this._imageInfo}
        shouldNotifyLoadEvents={true}
        src={'...'}
        blur={4}
      />
    );
  },
  _imageInfo: function(event){
    console.log(event.width, event.height);
  }
});