Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.4.0, 5.15.10
-
-
2022wk30FOQtforAndroid, 2022wk32FOQtforAndroid, 2022wk34FOQtforAndroid, 2022wk36FOQtforAndroid, 2022wk38FOQtforAndroid, 2022wk40FOQtforAndroid, 2022wk42FOQtforAndroid, 2023wk02FOQtforAndroid, 2022wk44FOQtforAndroid, 2022wk46FOQtforAndroid
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.