Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Android system navigation bar is always visible…

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #25071

    Jean-Marc

    Hi, for a game in Felgo 3, how do you hide the system navigation bar on Android at the same time as the status bar? Because I tried a lot of tricks but only the status bar is hidden, and nothing does to hide the Android navigation bar!

    #25072

    Alex
    Felgo Team

    Hi Jean-Marc,

    did you try messing around with the Android window flags, similar to this: https://stackoverflow.com/questions/25340593/issue-with-fullscreen-mode-in-android-with-qt-5-3-1/59469941#59469941

    There is also an older post in our forums on this topic, that should still apply mostly: https://felgo.com/developers/forums/t/android-fullscreen-support

    There is a chance that those flags are overwritten though, in that case you should migrate the game to Felgo 4 and make use of the new custom status bar style, which does not apply any own flags and gives you full control over the Android window flags: https://felgo.com/doc/felgo-themecolors/#statusBarStyle-prop

    Best,
    Alex

    #25074

    Jean-Marc

    Thank you Alex,

    I tried different things but nothing is working and the Android nav bar is still visible…

    It’s surprising that there haven’t been any solutions with Felgo since time and knowing that it’s still an essential feature for games…  😔

    Last week I tried to migrate to Felgo 4 but I didn’t manage to get my game working, something causes the game to crash but I didn’t find what it is! So I gave up trying to migrate!

    In my java file (in my project folder /android/src) I added a new QtActivity with

    onCreate(Bundle savedInstanceState)

    and

    onWindowFocusChanged(boolean hasFocus)

     

    and these flags:

    View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;

     

    I didn’t forget to add this new activity in <activity> in AndroidManifest.xml
    Everything compiles correctly.
    Do I have to set something else in my GameWindow object (Main.qml) ?

     

    #25075

    Jean-Marc
    #25076

    Jean-Marc

    Alex, there is still a question: in fact it works, as I said just before, but if I put the game in the background and I “resume” the game, the nav bar is displayed again…
    So, since I’m just using the code:
    QtAndroid::runOnAndroidThread([=]() { … }
    in main.cpp and I do not use a custom Activity (so no .java in the Android folder of the project), how to make an “onResumed” from main.cpp to relaunch the necessary code?

    #25078

    Alex
    Felgo Team
Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded