$ npm install react-native-zoom-layout --save
$ react-native link react-native-zoom-layout
android/app/src/main/java/[...]/MainApplication.java
import co.twinger.zoomlayout.RNZoomLayoutPackage;
to the imports at the top of the filenew RNZoomLayoutPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-zoom-layout'
project(':react-native-zoom-layout').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zoom-layout/android')
android/app/build.gradle
:
compile project(':react-native-zoom-layout')
import ZoomLayout from 'react-native-zoom-layout';
<ZoomLayout
ref={ref => this.zoomLayout = ref}
minZoom={1}
maxZoom={10}
style={{}}>
//your view
</ZoomLayout>