Wrong fullscreen size in Android
Unsolved
Mobile and Embedded
-
Hi!
I am having an issue when trying to set immersive mode for my Android app. The screen content is shifted due to the notch area in my cellphone. I am not interested in using the cutout edges in this particular app. The code works fine on devices with no notch.
Here is the sample code to reproduce the problem:import QtQuick Window { visibility: Window.FullScreen // If I use the lines below, the code works, but why? // y: Screen.desktopAvailableHeight - height // x: Screen.desktopAvailableWidth - width Rectangle { width: 30 height: parent.height color: "red" anchors.right: parent.right } Rectangle { width: parent.width height: 30 color: "blue" anchors.bottom: parent.bottom } }
Here are the results:
The rectangles don't appear. Is this a bug with Qt or is something wrong with the code? I tested using Qt 6.6.3 and 6.8.1.
If I use the commented lines, the area is set properly, but this seems like a workaround. Honestly, I don't understand why it should work as I am not changing the size, only the coordinates.
I appreciate any help you can provide.