mockingbot / react-native-immersive

Add Toggle for Android Immersive FullScreen Layout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Working with Modals

ascorbic opened this issue · comments

Hi,
Is there a way of getting this to work with Modals?

Do you mean the Immersive State do not last after Modal open? You can check Restore Immersive State.

And the Sample Component covers most of the basic usage

No, I mean is there a way of keeping it in immersive mode while the modal is open? It restores fine after the modal closes, but while the modal is open the soft buttons and system bar appear.

I guess that's a bit more difficult.

Just googled a bit and this stackoverflow seems to have the answer.

I'm not good at native Android, but I think to keep immersive mode during Modal, we may need to customize the code for creating the Modal.
On Android which should be a android.app.Dialog, and we should change the Java code to make the Dialog non-focusable. src

For our React Native app, we used zIndex & elevation to create Model like UI, and skipped the actual Modal component.

@ascorbic and @ThatBean Have you found any solution for this?

@HRCJ7 No, I never did.