Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android Full Screen issue
Forum Updated to NodeBB v4.3 + New Features

Android Full Screen issue

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 4 Posters 164 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BTSTOnline
    wrote last edited by
    #1

    I have an app that uses fullscreen by default. I want to restrict the app to only use the area between the System Notification Bar on top... and the Navigation Bar at the bottom.

    I am using Qt 6.10

    I've tried using various settings, as suggested by the interwebs... including this:

    ApplicationWindow {
        id: mainWin
        // minimumWidth: Screen.width
        // minimumHeight: Screen.height
    
        visibility: Window.FullScreen
        //flags: Qt.ExpandedClientAreaHint | Qt.NoTitleBarBackgroundHint
    
        visible: true
        Rectangle {
            id: appRect
    
            anchors {
                left: parent.left; right: parent.right; top: parent.top; bottom: parent.bottom
                topMargin: 10 + parent.SafeArea.margins.top
                bottomMargin: 10 + parent.SafeArea.margins.bottom
            }
        }
    }
    

    My issues:

    1. My app has a SwipeView with 5 pages. When first starting the app in portrait, the SafeAreas are not honored 100%. The top of the app is placed at the bottom of the Header/Notification bar, but the bottom is under the Nav Bar. If I switch to landscape and back, then both Safe Areas are honored.

    2. When switching to landscape, the left side (old top) is still spaced away from the edge... the top and bottom are at the new top and bottom... and the right side extends all the way to the right edge. However, if I swipe from the first page to the next (and on to each subsequent page)... I can see a portion of the old page in the 'unused' area on the left.

    My app has data presented to the user that I do not want to be behind the 'camera hole'... and so need to force it to only use the area between the two System Bars.

    Any suggestions?
    --Sam

    1 Reply Last reply
    0
    • ekkescornerE Offline
      ekkescornerE Offline
      ekkescorner
      Qt Champions 2016
      wrote last edited by
      #5

      seems we have to wait for 6.9.2 / 6.10Beta3: https://bugreports.qt.io/browse/QTBUG-135808

      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
      5.15 --> 6.9 https://t1p.de/ekkeChecklist
      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

      1 Reply Last reply
      0
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote last edited by JoeCFD
        #2

        Can you try?

            width: Screen.width
            height: Screen.height
        
            //visibility: Window.FullScreen
        
        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zvoopz
          wrote last edited by
          #3

          This is a working example for multiplatform build

          ApplicationWindow {
              id: mainWindow
              width: Qt.platform.os === "android" ? Screen.width : 450 //450 or whatever you assign
          
              height: Qt.platform.os === "android" ? Screen.height : width * 16 / 9
          
          
          1 Reply Last reply
          0
          • B Offline
            B Offline
            BTSTOnline
            wrote last edited by
            #4

            Nope... neither solution works.
            Both still push the app 'full screen' and it ends up behind the status & navigation bars... when initially started up. Rotating to landscape and back, the app is as intended... limited in height to the status & nav bars.

            However, in landscape mode, I also still get the pages extending past the app edge...

            1 Reply Last reply
            0
            • ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote last edited by
              #5

              seems we have to wait for 6.9.2 / 6.10Beta3: https://bugreports.qt.io/browse/QTBUG-135808

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.9 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              1 Reply Last reply
              0
              • B Offline
                B Offline
                BTSTOnline
                wrote last edited by
                #6

                @ekkescorner , your post in another thread helped:
                https://forum.qt.io/post/829606

                1 Reply Last reply
                0
                • B BTSTOnline has marked this topic as solved

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved