-
Notifications
You must be signed in to change notification settings - Fork 120
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
Black bar (where notification bar would be) present in fullscreen portrait mode on foldable phones #1919
Comments
What is your page type set as? I am not seeing back bars when I open my fold |
I had it set to "vertical" and "orientation" set to "free". I also just tried "left to right", "right to left", and "webtoon" and am seeing the same thing regardless of orientation. |
So this is part of the design choice inherited from j2k. I am undecided if I will switch to Mihon's implementation |
Ah, I thought it was only supposed to pertain to landscape only. So it's currently intended to behave this way in portrait mode on large-screens, but on small screens to be fullscreen? |
Could you elaborate. I know the pixel 9 pro fold tends to not trigger tablet or - [ ] landscape when opened. If you could provide side by sides with a phone. I can verify more if it's a bug or intended |
The Pixel 9 pro fold lets you switch between landscape and portrait mode by rotating the device. The aspect ratio is the same, but what it reports to the app should be different. For example, the Relay for Reddit app lets you configured different views based on portrait or landscape mode. I just rotate my fold to switch between the two modes, so the orientation is definitely being sent to the app how I think it is (using what API, I do not know though). Here's a JavaScript demo that I confirmed works in firefox and chrome on the Pixel 9 Pro fold when unfolded: https://jsfiddle.net/a19r6obh/ . Rotate the device and you'll see it switches between landscape and portrait, even though the aspect ratio is the same. As an aside, a friend of mine mentioned that there are some changes upcoming in Android 15 that may be relevant here: https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge . |
I played with this a bit and found out a few interesting things:
If you are like me and simply want to rebuild neko to always use the full screen, a quick and dirty change is to modify https://github.com/nekomangaorg/Neko/blob/main/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt#L1702 to: private fun setNotchCutoutMode() {
val params = window.attributes
params.layoutInDisplayCutoutMode =
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
} |
Thanks for looking into. Likely a product of the app being partially compose. When I get some time I'll play around and try to optimize it some more. |
Steps to reproduce
Expected behavior
I expect no black bar on the top of the screen where the notification bar is when in portrait mode (and ideally in landscape mode too - moot since its a 1:1 screen though)
Actual behavior
A black bar appears where the notification bar would be regardless of device orientation on large screens.
For example, on the Pixel 9 Pro Fold with a 1:1 aspect ratio screen, you can change between portrait and landscape mode for app-compatibility purposes by rotating the screen. This has no effect on Neko.
Interestingly, if you force "portrait" in neko's settings, you almost get the correct behavior when using the inner large screen. The top black bar is missing, but you get very thin black bars on the left and right. This is better, but still not ideal.
This is not an issue with Mihon and it works as expected.
This is possibly related to #534; however, Android should be reporting it as "portrait" mode when I rotate the device, yet the black bar is still there. This also results in a lot of wasted space on the Pixel 9 pro fold -- even if you don't want the notch to cover anything, if not using "full width" or if the comic has margins the notch would not normally cover anything.
Crash logs
No response
Neko version
2.17.1
Android version
Android 14
Device
Pixel 9 Pro Fold
Other details
The behavior of "ignore cutout areas" is confusing. It'd be ideal if Neko matched Mihon and just has a single universal "Show content in cutout areas" option that is either on or off with no other conditions considered.
Acknowledgements
The text was updated successfully, but these errors were encountered: