Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 809
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Remvoing black splash screen

How can I remove the black splash screen at start of the program? or at least reduce its time?

Developer
Posts: 16,795
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Remvoing black splash screen

yes, by replacing it with your own splash screen in the bar descriptor xml file.

regarding the second question check http://supportforums.blackberry.com/t5/Native-Development-Knowledge/Improving-startup-performance-of...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 809
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: Remvoing black splash screen

I did that, still half a second

 

 

Application app(argc, argv);

    // Create the Application UI object, this is where the main.qml file
    // is loaded and the application scene is set.
    new ApplicationUI();

    // Enter the application main event loop.
    return Application::exec();

 

 

ApplicationUI::ApplicationUI() :
        QObject()
{
    //app2  = app;
    QMetaObject::invokeMethod(this, "init", Qt::QueuedConnection);

}

 

void ApplicationUI::init()
{

	    // prepare the localization
	    m_pTranslator = new QTranslator(this);
	    m_pLocaleHandler = new LocaleHandler(this);

	    bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()));
	    // This is only available in Debug builds
	    Q_ASSERT(res);
	    // Since the variable is not used in the app, this is added to avoid a
	    // compiler warning
	    Q_UNUSED(res);

	    // initial load
	    onSystemLanguageChanged();

	    // Create scene document from main.qml asset, the parent is set
	    // to ensure the document gets destroyed properly at shut down.
	    qmlRegisterType<Timer>("com.devpda.tools", 1, 0, "MyTimer");
	    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);

	    // Create root object for the UI
	    root = qml->createRootObject<AbstractPane>();
	    if (!qml->hasErrors()) {
	                qDebug() << "casting and storing NavigationPane";
	                myNavi = dynamic_cast<NavigationPane*>(root);
	                qml->setContextProperty("quoteApp", this);
	            }
	    qDebug() << "before splah over function calls";

	    // Set created root object as the application scene
	    Application::instance()->setScene(root);
}

 

Developer
Posts: 16,795
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Remvoing black splash screen

you won't be able to avoid it completely.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Remvoing black splash screen

You can also do things like defering the creation of any components in QML that won't be visible on the first screen until they are needed later. For example, you don't need to create your Settings sheet before the main UI is displayed.


Loading a qml file can take a while, depending on how complicated it is.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker