PDA

View Full Version : App startup/preloading best practice



imwill
6 Oct 2011, 2:33 PM
Today, I stumbled upon http://prop.erti.es/app/

(http://prop.erti.es/app/)I think it was the first Sencha Touch web app I came across which had a nice transition between startup/preloading and the app itself. I tried to do something similar but it's not that smooth at all.

Here is my example:

app.css


body.startup { height: 100%;
text-align: center;
}


index.html



<body class="startup">

<div id="startup-loader" style="position: absolute; left: 50%; top: 50%; ">
<img src="public/resources/img/loader.gif" alt="lade..."/>
</div>
...



app.js




Ext.setup({
onReady: function () {
Ext.fly('startup-loader').remove();
Ext.getBody().removeCls("startup");
}
});



Any ideas how to avoid the white blink between the loader and app itself?