kiwibrowser / src.next

Source-code for Kiwi Next, a Kiwi Browser auto-rebased with latest Chromium
BSD 3-Clause "New" or "Revised" License
2.19k stars 281 forks source link

Immersive Fullscreen Browser window, APK build #1088

Open iBenMoore opened 6 months ago

iBenMoore commented 6 months ago

I'd like an option to be able to run this browser in fullscreen immerersive mode, where the browser is able to utilize the space of the android status bar and the camera notch area for phones that have that.

So I forked the project and created a branch and started down the path of testing some code according to the wiki workflows docs, etc., but after some build failures attempting to run actions, and reading through the issues here and realizing that building isn't really possible at the moment, I thought I'd share the request here.

I thought as an initial attempt I'd try adding a few lines after the line 519 setBackgroundDrawable of ChromeActivity.java, adding something like this:

519 getWindow().setBackgroundDrawable(getBackgroundDrawable());

    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
    }

Then, if that worked, I'd add a new immersive setting toggle or two to wrap around this. Seeing as I can't test build this stuff at the moment, if a dev that can wants to pick this up and try it out it would be appreciated. Thanks.

iBenMoore commented 4 months ago

160 Just found this, looks like this was already requested several years ago. Anyhow, maybe the sample code I left will help.

I'm also looking into some of the Vivaldi chromium code. It has a "Status Bar Visibility" option that allows you to hide the status bar. It almost works, but it doesn't include the notch/cutout option. It seems there's cutout support code in their code, but the toggle might not be activating it.

phntsm commented 3 months ago

Just came from the other request myself. Really hope this feature gets added - I already have screen burn in as it is so I try not to use apps that leave it visible.

KingNothing81 commented 3 months ago

It's not a solution, but just a workaround, but maybe some find that extension useful:

https://chromewebstore.google.com/detail/fullscreen/lbpgkagpackldbkfookmmdpfaolnoged

It's the only "fullscreen" extension I found that also works with Kiwi on Android.