I\'m trying to display an image in my React Native app (Android) and I want to give users an ability to zoom that image in and out. This also requires the image to be scroll
In my case I have to add images inside Viewpager with Zoom functionality.
So I have used these two library.
import ViewPager from '@react-native-community/viewpager'
import PhotoView from 'react-native-photo-view-ex';
which you can install from.
npm i @react-native-community/viewpager
npm i react-native-photo-view-ex
So I have used this code.
class ResumeView extends React.Component {
render() {
preivewArray = this.props.showPreview.previewArray
var pageViews = [];
for (i = 0; i < preivewArray.length; i++) {
pageViews.push(
);
}
return (
{pageViews}
)
}
pageScroll = (event) => {
console.log("onPageScroll")
}
}