I started from the Carousel example in Sencha Touch 2.1. In the app.js file, I see the “startupImage” property that defines the different sizes of the images we want to use. Yet, I can’t seem to find any documentation about this property. In the docs, they talk about “” and “” which are specific to the Apple iOS world. But if we use Sencha Touch, it’s because we dont wanna be tied to a specific company (it seems obvious).
What I want to know is, how does it works ? There is 2 parameters, one is a resoluton and the second is the path to the png file. Can we modify the first parameter or do we have to make png files that fit those numbers ?
Ext.application({
name: 'TestSencha',
requires: [
'Ext.MessageBox'
],
views: ['Main', 'PicViewer', 'Extras'],
icon: {
'57': 'resources/icons/Icon.png',
'72': 'resources/icons/Icon~ipad.png',
'114': 'resources/icons/Icon@2x.png',
'144': 'resources/icons/Icon~ipad@2x.png'
},
isIconPrecomposed: true,
startupImage: {
'320x460': 'resources/startup/320x460.jpg',
'640x920': 'resources/startup/640x920.png',
'768x1004': 'resources/startup/768x1004.png',
'748x1024': 'resources/startup/748x1024.png',
'1536x2008': 'resources/startup/1536x2008.png',
'1496x2048': 'resources/startup/1496x2048.png'
},
// rest of code goes here....
I suggest you take a look at src/core/Ext-more.js in the ST2 SDK.
Basically it scans the
startupImagedefined in the config of the application and test the OS of the device and its device ratio and call the addStartupImage like soAnd here is the
addStartupImage:Here’s for the explanation.
Hope this helps