defold / extension-webview

Defold extension for creating and controlling webviews to show html pages or evaluate javascript.
https://defold.github.io/extension-webview/
MIT License
13 stars 10 forks source link

Immersive mode on Android webview #11

Open subsoap opened 4 years ago

subsoap commented 4 years ago

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

subsoap commented 4 years ago
                        //| 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 commented 4 years ago

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 commented 4 years ago

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

britzl commented 4 years ago

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

britzl commented 4 years ago

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 commented 4 years ago

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

baochungit commented 5 months ago

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