Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immersive mode on Android webview #11

Open
subsoap opened this issue Feb 10, 2020 · 7 comments
Open

Immersive mode on Android webview #11

subsoap opened this issue Feb 10, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@subsoap
Copy link

subsoap commented Feb 10, 2020

If the project has immersive mode enabled the webview will not be - the bottom UI (with back button) will be visible.

@subsoap
Copy link
Author

subsoap commented Feb 10, 2020

                        //| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                        //| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
                        | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
                        | View.SYSTEM_UI_FLAG_IMMERSIVE

Uncommenting these helped to hide the bottom nav on webview though they might be there for a reason?

@britzl
Copy link
Contributor

britzl commented Feb 10, 2020

I'm not sure what kind of impact this might have. Ideally some of these View flags should be configurable. Have you noticed any difference?

@subsoap
Copy link
Author

subsoap commented Feb 11, 2020

Not in functionality on the page, but it might be necessary for some features I'm not using.

@britzl
Copy link
Contributor

britzl commented Feb 12, 2020

Yeah, I think we need to make these into options when you create the webview.

@britzl britzl added the enhancement New feature or request label Feb 12, 2020
@britzl
Copy link
Contributor

britzl commented Mar 4, 2020

I've played around with this a bit. The annoying thing is that the navigation bar becomes visible briefly when hiding/showing a webview. Did you experience this as well @subsoap ?

@subsoap
Copy link
Author

subsoap commented Mar 4, 2020

@britzl Yes, I have seen this when opening / closing webviews (and it's annoying to me too, not sure how to fix it).

@baochungit
Copy link
Contributor

My guess is it dues to the new window focused.
wm.addView(); --> new window/view focused
wm.removeView(); --> old window/view focused
I don't see it on my real device which running Android 12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants