Open kalyanijamunkar10 opened 4 years ago
In my tests, even tough all my app reorients itself when in landscape mode, the
@feliperaul try using react-native's Modal with react-native-image-zoom-viewer. This worked for me. you need to add supportedOrientations={['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']} in Modal.
If you need orientation support, you can use react-native-zoom-viewer
like this.
<Modal visible={visible}>
<ImageViewer
renderIndicator={() => null}
onSwipeDown={() => setIsVisible(false)}
maxOverflow={0}
renderHeader={() => (
<Pressable
alignSelf="flex-end"
right={4}
top={20}
zIndex={1}
position="absolute"
onPress={() => setIsVisible(false)}
>
<Icon
name="white-cross-new"
alt="white-cross-new"
height={32}
width={32}
/>
</Pressable>
)}
enableSwipeDown={true}
imageUrls={[
{
url: imageUrl,
props: {
style: {
transform: [{ rotate: "90deg" }],
},
},
},
]}
/>
</Modal>
images shows incorrectly in landscape mode