[Interest] Android launch screens?

Jason H jhihn at gmx.com
Wed Aug 5 22:48:45 CEST 2015


Within the template QtActivity.java:
 if (m_activityInfo.metaData.containsKey("android.app.splash_screen_drawable"))
    getWindow().setBackgroundDrawableResource(m_activityInfo.metaData.getInt("android.app.splash_screen_drawable"));
  else
    getWindow().setBackgroundDrawable(new ColorDrawable(0xff000000));

That happens. But then later loadApplication(...) uses Ministro to load the Qt app. That's where I get lost. It seems that the handoff is not as good as it can be?

 

Sent: Wednesday, August 05, 2015 at 4:15 PM
From: "Alexey Godko" <koloboid at gmail.com>
To: "Jason H" <jhihn at gmx.com>
Cc: "interest at qt-project.org" <interest at qt-project.org>
Subject: Re: [Interest] Android launch screens?

I'm expecting the same issues, but on all my test devices black screen tooks less than one second, so it is not issue for me. May be custom redraw on Android's activity will help, I'll try it when time.
Simple setting getWindow().getDecorView().findViewById(android.R.id.content).setBackgroundColor(0xFF0000); does not work. so it needs more investigation
 
2015-08-05 22:01 GMT+03:00 Jason H <jhihn at gmx.com>:

Thanks, I have this working, kind-of.
 
1. Why does the resource merger only support [a-z]._ ? Android supports [A-Za-z]._
2. When My app launches it gets a black screen (with the title of the app), then goes to the splash.png, then goes back to black, then shows the IU. What are the tips for getting this as seamless as possible?
My main Window element has {color: "..." } and the splash is of the same color. It seems it should not go back to black?
And I think the title bar on launch is able to be hidden by a manifest setting maybe?
 
Many thanks.
 
 

Sent: Wednesday, August 05, 2015 at 11:29 AM
From: "Alexey Godko" <koloboid at gmail.com[koloboid at gmail.com]>
To: No recipient address
Cc: "interest at qt-project.org[interest at qt-project.org]" <interest at qt-project.org[interest at qt-project.org]>
Subject: Re: [Interest] Android launch screens?

Just putting splash.png to res/drawable and line below to AndroidManifest.xml<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/splash"/>
 
works for me
Also, may be you want to display the same splash in your QML code with dynamically load rest of scene using Loader.
 
2015-08-05 18:03 GMT+03:00 Jason H <jhihn at gmx.com[http://jhihn@gmx.com]>:This question is 50% Qt and 50% Android. Now that I have a launch screen working in iOS, I'd like the same thing in Android.

Now, iOS lists the launch screen separately from the rest of the application, so it can be loaded without having to load the whole app. I'm not sure this is the case in Android. Most android tutorials just create a Activity subclass with a timeout.

I was wondering if:
1) There is a true launch screen for android (not just faking it with a timeout - I want it to only be displayed for as long as the app is loading),
2) How I can accomplish it in Qt? I *think* some people may have done something with a Loader Element to create a stub, then dynamically load the screens, but I'm not sure of what all that entails, and if there are any caveats.
2a) Also, do I need to provide an Activity, or can I do it all in Qt/QML?
2b) Is there any actual perceived benefit? The iOS makes the app seem more responsive in a way, and the loading time is not significantly increased.

Many thanks in advance.
_______________________________________________
Interest mailing list
Interest at qt-project.org[http://Interest@qt-project.org]
http://lists.qt-project.org/mailman/listinfo/interest_______________________________________________ Interest mailing list Interest at qt-project.org[Interest at qt-project.org] http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list