ascoders / react-native-image-viewer

🚀 tiny & fast lib for react native image viewer pan and zoom
MIT License
2.44k stars 577 forks source link

Hide StatusBar on model show. #410

Closed Ace000001 closed 3 years ago

Ace000001 commented 4 years ago

I was wondering if there is a way to hide the statusbar when viewer is visible? I can set the background and color of status bar but i reduces the focus while browsing images.

reyn-nova commented 4 years ago

import { StatusBar } from 'react-native'

StatusBar.setHidden(true) //before set visible true?

then on Modal onDismiss set the status bar hidden false again

Ace000001 commented 4 years ago

@rp-nova Thanks for your reply. Already tried that. But when i hide the StatusBar on the model my StatusBar on the parent screen gets visible behind the model. I even tried setting the zIndex of the model but no use. Model is not taking the space of full screen leaving the safe area on top.

reyn-nova commented 4 years ago

@Ace000001 could you tell me, if you set the status bar translucent to true followed by changing status bar background to 'transparent', does it also not working?

reyn-nova commented 4 years ago

just only when the viewer is visible, after that you can return it back to the previous status bar state

Ace000001 commented 4 years ago

I wasn't working even with translucent true and transparent background. Due to the shortage of time I switched to an other plugin and it had an built in option to hide the status bar for full screen view. So i got it working with another package.

suhailamir commented 3 years ago

@Ace000001 Could you tell what other package you used, Thanks.

Ace000001 commented 3 years ago

@suhailamir Here

suhailamir commented 3 years ago

Thanks @Ace000001