alwx / react-native-photo-view

Pinch-to-zoom view for React Native (both iOS and Android)
MIT License
815 stars 434 forks source link

react-native-photo-view in ios image is not open proper width of the image. #196

Open bishwajeet-billme opened 4 years ago

bishwajeet-billme commented 4 years ago

In ios device, image is not open proper image width format.

<PhotoView source={{ uri: props.uri }} minimumZoomScale={1} //scale={2.5} //onProgress={()=>console.log("Progress ....")} // loadingIndicatorSource={() => <ActivityIndicator animating={true} // size="large" color="#0000ff" />} maximumZoomScale={10} onLoad={() => props.onLoading()} onLoadEnd={() => props.onLoadingEnd()} style={{ borderWidth:1, borderColor:'red', width:null, height: props.height / props.width * Dimensions.get("window").width //height:props.height }} />

anilios commented 4 years ago

Set following properties:

androidScaleType="fitCenter" style={{flex:1}} minimumZoomScale={1}