Results 1 to 2 of 2

Thread: How to change precedence of splash screen and app icon in sencha touch+phonegap?

  1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    3

    Default Answered: How to change precedence of splash screen and app icon in sencha touch+phonegap?

    I have generated a sencha touch 2 application with phonegap packaging, and I couldn't help but notice that the default splash screen and application icon is one of phonegap. This looks a little bit redundant, since in the application, you get the first time you generate a project, there are two places where splash screen and icon are defined. In `app.js`:

    Code:
        icon: {
                57: 'resources/icons/Icon.png',
                72: 'resources/icons/Icon~ipad.png',
                114: 'resources/icons/[email protected]',
                144: 'resources/icons/[email protected]'
            },
        
        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'
            }
    and in `config.xml`:

    Code:
    <icon src="res/icon/android/icon-36-ldpi.png"   gap:platform="android"    gap:density="ldpi" />
    <icon src="res/icon/android/icon-48-mdpi.png"   gap:platform="android"    gap:density="mdpi" />
    <icon src="res/icon/android/icon-72-hdpi.png"   gap:platform="android"    gap:density="hdpi" />
    <icon src="res/icon/android/icon-96-xhdpi.png"  gap:platform="android"    gap:density="xhdpi" />
    
    <gap:splash src="res/screen/android/screen-ldpi-portrait.png"  gap:platform="android" gap:density="ldpi" />
    <gap:splash src="res/screen/android/screen-mdpi-portrait.png"  gap:platform="android" gap:density="mdpi" />
    <gap:splash src="res/screen/android/screen-hdpi-portrait.png"  gap:platform="android" gap:density="hdpi" />
    <gap:splash src="res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:density="xhdpi" />
    Looks like that the one in config.xml takes precedence, but how do I control which images to show and where to control for how long the splash screen needs to be shown, and what if I wanted to, for instance, add loading indicator? Does this mean that I could remove the settings in sencha touch?

  2. If you are packaging your application with phonegap this is controlled by phonegap and you will have to specify the icon path in config.xml. Check your phonegap documentation on configuring splash screen.
    http://docs.phonegap.com/en/3.4.0/co...lash%20Screens

  3. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    If you are packaging your application with phonegap this is controlled by phonegap and you will have to specify the icon path in config.xml. Check your phonegap documentation on configuring splash screen.
    http://docs.phonegap.com/en/3.4.0/co...lash%20Screens
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •