jobtoday/react-native-image-viewing

presentationStyle=coverFullScreen does not hide status bar on Android

appsgenie opened this issue · 5 comments

Using a Pixel 2 phone. In Expo Go app.
No matter what options I choose for the presentationStyle property can't help me show images in full screen with everything hidden (just showing the image and close button).

It actually shows the status bar explicitly when I hide it before tapping on the ImageView 👀

janpe commented

I'm seeing this problem as well. presentationStyle="overFullScreen" is not working on Android 10. The status bar is still visible but it doesn't take its space so the content behind the modal is pushed up and is visible through the status bar.

Untitled@0 5x

so I think what we actually need here is to set statusBarTranslucent={true} that will fix the underlying issue using the react-native Modal.

so I think what we actually need here is to set statusBarTranslucent={true} that will fix the underlying issue using the react-native Modal.

@appsgenie Could you clarify where exactly this could be added?

Hi guys, I found a trick that we can set statusBarTranslucent={presentationStyle === "overFullScreen"} and comment the StatusBarManager. That can resolve the problem with the status bar on Android and provide smooth animation too. Then you can use patch-package to apply it.

Screenshot 2023-10-11 at 14 13 44