Android - ApplicationWindow doesn't run fullscreen



  • Hello,

    When Running this Code on Android I get a Application with black Background, but a white line on the top and the right with the width of 1.

    ApplicationWindow {
        visible: true
        Button {
            anchors.centerIn: parent
            text: qsTr("Test")
        }
        background:  Rectangle {
            gradient: Gradient {
                GradientStop { position: 0; color: "#000000" }
                GradientStop { position: 1; color: "#222222" }
            }
        }
    }
    

    What do I need to do to let it fit the full screen?

    Android 6.0.1 - Kernel-Version 3.10.84

    alt text

    alt text


  • Moderators

    @QtHelex I think your app is full-screen (you can even see the gradient). You probably have to change the style-sheet so the that lines have same colour as the background (I doN't know how to do it).



  • @jsulm said in Android - ApplicationWindow doesn't run fullscreen:

    @QtHelex I think your app is full-screen (you can even see the gradient). You probably have to change the style-sheet so the that lines have same colour as the background (I doN't know how to do it).

    If the Application really runs full screen, why should only be (screenwidth-1) pixels be accessible?
    In this case 1079 instead of 1080 pixels width.

    Is this a bug or am I doing something wrong here?



  • Hi!

    I'm not sure why the screen isn't filled completely, but did you already try filling the whole window content with the Rectangle instead of setting the background property?

    ApplicationWindow {
        visible: true
        Button {
            anchors.centerIn: parent
            text: qsTr("Test")
        }
       
      Rectangle {
            anchors.fill: parent
            gradient: Gradient {
                GradientStop { position: 0; color: "#000000" }
                GradientStop { position: 1; color: "#222222" }
            }
        }
    }
    


  • @GTDev said in Android - ApplicationWindow doesn't run fullscreen:

    Hi!

    I'm not sure why the screen isn't filled completely, but did you already try filling the whole window content with the Rectangle instead of setting the background property?

    Yes, already tried and just verified. The background filling was also just to make the issue better visible.

    I started with the Qt Quick Controls 2 Application which had the same issue but because of the white background it was just visible at the TabBar in the footer.

    ApplicationWindow {
    
        /* some stuff */
        
        footer: TabBar {
            id: tabBar
            currentIndex: swipeView.currentIndex
            TabButton {
                text: qsTr("First")
            }
            TabButton {
                text: qsTr("Second")
            }
        }
    }
    

    This code produces 2 TabButtons on the bottom of the screen. When the second is pressed you can see a ugly white line in the right of the Button.



  • Here seems to have someone else the same issue on a Nexus 5x device with Android 7:
    http://stackoverflow.com/questions/42258879/qt-android-app-example-looks-weird-on-real-device


  • Qt Champions 2016

    @QtHelex hi, great to see you trying out QtQuickControls2. Think last time we met at a BlackBerry event ;-)

    I really like QtQuickControls2 and in the meantime I'm able to develop apps looking similar to BB10 Cascades.

    The problem with the white line: I already reported a bug here: https://bugreports.qt.io/browse/QTBUG-53247
    please vote up and add your usecase there. thx.

    for the problem with the Android Status Bar color @jpnurmi found a way, see: https://bugreports.qt.io/browse/QTBUG-51196



  • @ekkescorner said in Android - ApplicationWindow doesn't run fullscreen:

    @QtHelex hi, great to see you trying out QtQuickControls2. Think last time we met at a BlackBerry event ;-)

    Yeah, at the BlackBerry Classic launch event. Way too long ago but great to see here finally a familiar face. :-)

    I'm checking out where the future of my passion might go since BlackBerry "is getting history". At lot of stuff changed at Qt since the Symbian and MeeGo days. Very impressive but also somehow not inspiring confidence to see I'm failing already on such basic stuff like the screen resolution. :-/

    I really like QtQuickControls2 and in the meantime I'm able to develop apps looking similar to BB10 Cascades.

    I hope with the same success and customer acceptance. :-)

    I'm currently not sure how far my path with Qt on Android might go. Commercial is too expensive and publishing for iOS fails already on the missing hardware on my site. Looks anyway too hard to keep my passion on Android and iOS self financing like on MeeGo and BlackBerry.

    The problem with the white line: I already reported a bug here: https://bugreports.qt.io/browse/QTBUG-53247
    please vote up and add your usecase there. thx.

    Great, thanks! Already voted up. I will add my simple example later today. :-)


  • Qt Champions 2016

    @QtHelex said in Android - ApplicationWindow doesn't run fullscreen:
    ...

    I'm checking out where the future of my passion might go since BlackBerry "is getting history". At lot of stuff changed at Qt since the Symbian and MeeGo days. Very impressive but also somehow not inspiring confidence to see I'm failing already on such basic stuff like the screen resolution. :-/

    I started my Qt for mobile development one year ago with QtQuickControls2. There was a great progress on these controls from 5.6 to 5.8
    I'm sure this bug will be fixed. Not so many devs are using the dark theme where the white lines are visible - coming from BB10 of course the dark theme is important. (also for my customers)

    I really like QtQuickControls2 and in the meantime I'm able to develop apps looking similar to BB10 Cascades.

    I hope with the same success and customer acceptance. :-)

    yep - they really like it and are very impressed. (Customers from Enterprise and SMBs)
    next weeks some more apps from customers will also come to GooglePlay and Apple Store
    I alsso just started first Android for Work project

    I'm currently not sure how far my path with Qt on Android might go. Commercial is too expensive and publishing for iOS fails already on the missing hardware on my site. Looks anyway too hard to keep my passion on Android and iOS self financing like on MeeGo and BlackBerry.

    have you looked at the prices for startups / independent ?
    I compared QQC2 with Xamarin, ReactNative, ... and from my feeling Qt is the best solution where in most cases you only have to develop once for android, ios, W10

    The problem with the white line: I already reported a bug here: https://bugreports.qt.io/browse/QTBUG-53247
    please vote up and add your usecase there. thx.

    Great, thanks! Already voted up. I will add my simple example later today. :-)

    thanks



  • @ekkescorner
    Updated Bug Report. Might lead to the root of the issue.

    How many different Android Devices do you have to test on?
    Only the BlackBerry ones?

    @ekkescorner said in Android - ApplicationWindow doesn't run fullscreen:

    I'm currently not sure how far my path with Qt on Android might go. Commercial is too expensive and publishing for iOS fails already on the missing hardware on my site. Looks anyway too hard to keep my passion on Android and iOS self financing like on MeeGo and BlackBerry.

    have you looked at the prices for startups / independent ?

    Yes, but I'm not sure if I'm able to make 70$/Month with about 8 to 10 hours time for this passion per week. What me bothers too is that I will have to publish my home address at google play store to even get able to receive earnings. Publishing everything for free and having only costs wouldn't pass the family powwow. In this case I would have to spent the time for home improvement projects rather than app development. ;)
    The fact that I have not a single Apple device doesn't make it better. I would have to invest a lot additionally to the 70$ Qt startup license and the 100$ apple store fee.

    I really hope a small amount of off topic small talk is tolerated in this forum. I've reduced it already to the minimum. Dead certain! 0:-)

    I compared QQC2 with Xamarin, ReactNative, ... and from my feeling Qt is the best solution where in most cases you only have to develop once for android, ios, W10

    Check my Nickname. I fell already with the Nokia N9 in love with Qt and it was also the sole reason to begin publishing apps for BlackBerry 10.


  • Qt Champions 2016

    @QtHelex I'm testing on these devices:

    Android:
    a) secure devices typically used at Enterprises
    BlackBerry PRIV (Touch with slider)
    BlackBerry DTEK50 (touch only, low cost)
    BlackBerry DTEK60 (touch only, high-end)
    coming soon: BlackBerry KEYone (physical touchable keyboard)
    b) other Android devices business customers are using
    Samsung Xcover3 (low-cost, low resultion, outdoor, IP67 certified)
    Tablet Amazon Fire HD8 (low cost tablet)
    Google Pixel C Tablet (high end tablet)

    iOS:
    iPhone6
    iPad Mini

    all these devices give me a mix of density and pixels and sizes to test my QQC2 apps on and to see if resizing works well

    your problem with the license fees: let us chat about



  • Regarding DevicePixelRatio a additional question came to my mind.

    Is it even possible to use the native resolution of a device or are we always relying on the NativeResolution / DevicePixelRatio within qml?

    I hope to find soon some more time to experiment with the new version of Qt.

    @ekkescorner said in Android - ApplicationWindow doesn't run fullscreen:

    I really like QtQuickControls2 and in the meantime I'm able to develop apps looking similar to BB10 Cascades.

    I hope with the same success and customer acceptance. :-)

    yep - they really like it and are very impressed. (Customers from Enterprise and SMBs)
    next weeks some more apps from customers will also come to GooglePlay and Apple Store
    I alsso just started first Android for Work project

    What kind of apps are those? Have you successfully used stuff like daemons for background processes, push notifications or created widgets? Or have you developed so far rather common frontend applications using Qt?
    If I recall correctly you worked 2 years ago on a pretty cool project using a bar code scanner and experimented with a mobile printer. I wonder where are currently the show stoppers of Qt 5.8.


  • Qt Champions 2016

    @QtHelex said in Android - ApplicationWindow doesn't run fullscreen:

    Regarding DevicePixelRatio a additional question came to my mind.

    Is it even possible to use the native resolution of a device or are we always relying on the NativeResolution / DevicePixelRatio within qml?

    that wouldn't be a good idea
    there are so many different sizes / Pixel / Density devices out there and your Icons/ Images have to look good always
    you can try and remove
    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    from main.cpp

    I hope to find soon some more time to experiment with the new version of Qt.
    ....
    What kind of apps are those? Have you successfully used stuff like daemons for background processes, push notifications or created widgets? Or have you developed so far rather common frontend applications using Qt?

    background processes not yet but next 2 months
    push notification: will do this for this years QtWorldSummitConference app - development just started
    have done common frontend apps using REST API for different domains
    also just working on a BT LE app for german enterprise and Barcode Scanner app for SMB
    even done a 'Mobile Toilet Manager' APP (Dixie Toilets) ;-)
    also TimeTracker APP

    If I recall correctly you worked 2 years ago on a pretty cool project using a bar code scanner and experimented with a mobile printer.

    that app will be moved later this year to Android, iOS

    I wonder where are currently the show stoppers of Qt 5.8.

    no show stoppers yet, but missing easy integration into OS as could be done from BlackBerry Cascades Invokation framework

    so far I'm happy with Qt 5.8 and QtQuickControls2


  • administrators

    Hi @QtHelex
    Just a comment on the cost side.
    If you target only Android, you can probably go the LGPL route. I'm not sure what the situation with iOS is, it used to be complicated with their attitude towards libraries, but I haven't checked in a while (I have no apple devices at work or at home so I don't follow that too closely).

    And last, I'll just ping @jpnurmi because there is a lot of good talk in this thread that he really should read :)


  • Qt Champions 2016

    @tekojo thx Tero mentioning @QtHelex going LGPL if Android-only.

    I'm always thinking x-platform and there's no way to publish at Apple Store conform to LGPL.

    I know @QtHelex has written some great apps for BlackBerry10 Cascades and I promise he'll be able to do the same using QtQuickControls2.

    Unfortunately his first steps using a dark theme causes trouble because of the 1 px white space visible at right and bottom. In the meantime I figured out that the reason was multiplying the HighDPI Pixels * DevicePixelRatio which causes on some devices 1 lost pixel. Curious: at starting app all is dark, rotating one time to landscape and back the white space is there. (https://bugreports.qt.io/browse/QTBUG-53247)


  • administrators

    I know he's really good, I remember him from the N9 times :)


  • Qt Champions 2016

    @tekojo so he's a dinosaur and I'm a newbie at Qt ;-)



  • @ekkescorner said in Android - ApplicationWindow doesn't run fullscreen:

    no show stoppers yet, but missing easy integration into OS as could be done from BlackBerry Cascades Invokation framework

    But you were able to, aren't you?

    so far I'm happy with Qt 5.8 and QtQuickControls2

    Good to read. :)

    @tekojo said in Android - ApplicationWindow doesn't run fullscreen:

    I know he's really good, I remember him from the N9 times :)

    I guess that's already too much warm words in this thread. :)
    I will continue to play with Qt, promised. :D Just hard to find enough time to start from zero in a new ecosystem.

    I recall you too from the maemo forums by the way. Good to see familiar users over here. :-)

    @ekkescorner said in Android - ApplicationWindow doesn't run fullscreen:

    @tekojo so he's a dinosaur and I'm a newbie at Qt ;-)

    I'm using Qt in the one or other way since maybe 6 or 7 years. But only in my spare time. So it shouldn't be too hard to overtake me and get yourself a dinosaur. :-p


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.