[Android]How to set the screen direction and make it display in FullScreen?

  • I mean..It's Vertical in default, I want it "Lie down" and fullscreen(no status bar).
    My App. is a QML app, I can't find any helpful doc. in Help..Thx a lot!

  • Have you tried setting the orientation in the AndroidManifest.xml file?

    <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >@

    Add the* android:screenOrientation* part and your app will always be in landscape mode i.e, "Lie down" mode :)

  • Ehh..Where should I edit this file? new one and add it to qrc or edit the "BUILD-PATH/android/AndroidManifest.xml"?

  • edit the AndroidManifest.xml file that is in the build folder.

  • and if you need fullscreen just use:
    @QQuickView view;

    remember you need Qt 5.2 it doesnt work with earlier versions (statusbar stays on the screen)

  • Thanks a lot!I sovled it by .showFullScreen();

Log in to reply

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