Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43558

[Android] The splashscreen starts late and ends with a flicker

    Details

    • Platform/s:
      Android

      Description

      I am using QQmlApplicationEngine together with an ApplicationWindow on the qml side. If I enable the splashscreen I notice 2 things:

      1) The splashscreen starts late. This is very noticeable on some low-end devices, when the splashscreen is displayed after 3-4 seconds since the app was opened. In that interval, the screen is black.

      However, there is a fix/workaround. Using a custom theme:

      // theme.xml in res/values and android:theme="@style/MyAndroidStyle in AndroidManifest

      <?xml version="1.0" encoding="utf-8"?>
      <resources>
          <style name="MyAndroidStyle" parent="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">
              <item name="android:windowBackground">@drawable/logo</item>
          </style>
      </resources>
      

      With this fix/workaround, the splashscreen is displayed instantly.

      2) When the splashscreen is gone and the qml is about to be exposed there is a very quick flicker that coincides with:

      W/Qt      ( 3076): (null):0 ((null)): QEGLPlatformContext::swapBuffers(): eglError: 12301, this: 0x67996800 
      

      I've tried to overcome this flicker on the Android side, by adding an overlaying view above getWindow().getDecorView().getRootView() of the main activity. This overlay covers the Qt surface entirely. Even so, the flicker still happens and it affects the overlaying Android view as well. I don't think this can be workarounded on the Android side.

      Maybe the EGLSurface is not yet initialized and has nothing to display? Might be a good idea to initialise the EGL surface with the "android.app.splash_screen_drawable", if possible.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              adrian.gabureanu Adrian Gabureanu
            • Votes:
              25 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes