react-native-image-blur-applaunch
v1.0.5
Published
## Getting started
Downloads
3
Readme
react-native-image-blur
Getting started
$ npm install react-native-image-blur-applaunch --save
Mostly automatic installation
$ react-native-image-blur-applaunch
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-image-blur-applaunch
and addRNImageBlur.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNImageBlur.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.applaunch.reactnative.RNImageBlurPackage;
to the imports at the top of the file - Add
new RNImageBlurPackage()
to the list returned by thegetPackages()
method
Append the following lines to
android/settings.gradle
:include ':react-native-image-blur-applaunch' project(':react-native-image-blur-applaunch').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-blur-applaunch/android')
Insert the following lines inside t he dependencies block in
android/app/build.gradle
:implementation project(':react-native-image-blur-applaunch')
Add ImageBlurScreenActivity into your AndroidManifest.xml
<activity android:name="com.applaunch.reactnative.ImageBlurScreenActivity" android:theme="@style/Base.Theme.AppCompat"/> <!
Usage
// Create js file and paste this code
import React from 'react'
import PropTypes from 'prop-types'
import { requireNativeComponent } from 'react-native'
class ImageBlurComponent extends React.Component {
render() {
return <RNImageBlur {...this.props} />
}
}
ImageBlurComponent.propTypes = {
url: PropTypes.string.isRequired
}
ImageBlurComponent.defaultProps = {
resizeMode: 'contain',
}
var RNImageBlur = requireNativeComponent('RNImageBlur', ImageBlurComponent)
export default ImageBlurComponent
// After creating this file just import it and use it.
import ImageBlurComponent from '../../../NativeModules/ImageBlurComponent'
<ImageBlurComponent url ={'Image Uri'} />