[Android-development] Android Splash Screen

Ben Lau xbenlau at gmail.com
Mon Nov 2 12:34:48 CET 2015


Hi Liang Jain,

It will be great if you can find out the problem. Moreover, I think Qt dev
team may also consider to remove their own splash screen support which is
quite meaningless. They just not to clear window background during
onCreate() will be helpful

On 1 November 2015 at 21:20, Liang Jian <jianliang79 at gmail.com> wrote:

>      Hi Ben Lau,
>      You are right, with both methods applied the flicker will be minimal.
> I think now the flicker may be related to the creation of EGL surface, I
> will do more investigation into it.
>
> On Sun, Nov 1, 2015 at 9:05 PM, Ben Lau <xbenlau at gmail.com> wrote:
>
>> Hi Liang Jian,
>>
>> I mean to mix your method (custom AndroidStyle) together with
>>  android.app.splash_screen_drawable. It should have no impact for splash
>> screen loading time. It can be shown immediately after clicked to start the
>> application.
>>
>> However, for the flicker problem,yes , it still exists. But I think it is
>> less obvious then custom AndroidStyle only. I need to be focused on screen
>> change to discover the flicker.
>>
>> From my understanding, the splash screen change process can be divided
>> into 3 steps:
>>
>> 1. Render window background and title bar according to theme.
>>
>> 2. QtActivity.onCreate(Bundle)
>>
>> If android.app.splash_screen_drawable is set, it will render the
>> drawable. Otherwise, it will clear window background to #ff000000.
>>
>> 3. QQmlEngine loads the first scene and start rendering.
>>
>> If your don't set android.app.splash_screen_drawable, both of step 2 and
>> 3 will first render a black screen, but their timing are different. Step 3
>> is short and less obvious.
>>
>>
>>
>>
>> On 1 November 2015 at 20:36, Liang Jian <jianliang79 at gmail.com> wrote:
>>
>>>     To Ben Lau: I have tried this method in the past, but that will also
>>> cause the flicker issue, and the most important is: with this method, It
>>> will take very long time before the splash screen show up after I click to
>>> start the app.
>>>
>>> On Sun, Nov 1, 2015 at 2:25 PM, Ben Lau <xbenlau at gmail.com> wrote:
>>>
>>>>
>>>> I have a suggestion. Based on the method from Liang Jian. Add the
>>>> following line to AndroidManifest.xml:
>>>>
>>>>             <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/icon"/>
>>>>
>>>>
>>>> The "android:resource" should point to the same file like your
>>>> MyAndroidStyle.
>>>>
>>>> Will that fix the problem?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 1 November 2015 at 09:40, Liang Jian <jianliang79 at gmail.com> wrote:
>>>>
>>>>>     I think we have encountered the same problem, the flicker I have
>>>>> mentioned is the black screen between splash screen and the first qml page
>>>>> :-)
>>>>>
>>>>> On Fri, Oct 30, 2015 at 11:23 PM, Bruno Tezine <btezine at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Liang Jian,
>>>>>> Thank you for your response.
>>>>>> I already tried to use this approach. You complain about a flicker,
>>>>>> but what about the black screen between the splash and the first qml page?
>>>>>> I don't know if this happened with you, but under my tests, the
>>>>>> splash screen appears ok, but then the screen goes black for a while until
>>>>>> the main qml page is loaded.
>>>>>> Does it happen with you?
>>>>>> Kind regards,
>>>>>>    Bruno.
>>>>>>
>>>>>>
>>>>>> 2015-10-30 12:11 GMT-02:00 Liang Jian <jianliang79 at gmail.com>:
>>>>>>
>>>>>>>      According to my experience, the best way to show splash screen
>>>>>>> in qt-android is to use a custom android theme and set its
>>>>>>> android:windowBackground. In this way the splash screen will show instantly
>>>>>>> after you click to launch your app. But unfortunately there is an annoying
>>>>>>> bug about this method, please refer to
>>>>>>> https://bugreports.qt.io/browse/QTBUG-43558
>>>>>>>
>>>>>>> On Thu, Oct 29, 2015 at 9:06 PM, Bruno Tezine <btezine at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> How can I create a splash screen for Android using Qt (without
>>>>>>>> widgets)?
>>>>>>>> I don't know if it's possible. The idea is to present a splash
>>>>>>>> screen(image) immediately while the first qml page is loading. No timers
>>>>>>>> involved.
>>>>>>>> I have read several samples, but none seems to fit. Let me explain:
>>>>>>>>
>>>>>>>> 1) http://doc.qt.io/qt-5/qtquick-window-example.html
>>>>>>>> --This example uses a timer. It doesn't display a splash while the
>>>>>>>> app is still loading the first screen.
>>>>>>>>
>>>>>>>> 2)
>>>>>>>> http://stackoverflow.com/questions/5486789/how-do-i-make-a-splash-screen
>>>>>>>> --It explains how to create splash screens using two approaches.
>>>>>>>> One using an Activity and other using a theme style. The first approach
>>>>>>>> uses a timer and delays the app load. The second quickly display a splash,
>>>>>>>> but after it disappears, the screen goes black while loading the first qml
>>>>>>>> page.
>>>>>>>>
>>>>>>>> Is it possible?
>>>>>>>> Thank you,
>>>>>>>>    Bruno.
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Android-development mailing list
>>>>>>>> Android-development at qt-project.org
>>>>>>>> http://lists.qt-project.org/mailman/listinfo/android-development
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Android-development mailing list
>>>>> Android-development at qt-project.org
>>>>> http://lists.qt-project.org/mailman/listinfo/android-development
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20151102/345b6ca5/attachment.html>


More information about the Android-development mailing list