1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    43
    Vote Rating
    0
    Answers
    1
    fatfly is on a distinguished road

      0  

    Default Answered: Ext.Img not working after app build

    Answered: Ext.Img not working after app build


    Hi,
    I have a panel with an image inside using Ext.Img, as code below. It works perfectly in Chrome on my computer. No error or warning in the console.
    When I compile the app for android, the image is not displayed.
    It's ST2.1.1 compile with Sencha cmd 3.0 . I have no other issue except this one.

    Any idea why? Thanks

    Code:
    Ext.define('JAM.view.Main', {
        extend: 'Ext.Panel',
        xtype: 'main',
        requires: [
            'Ext.TitleBar',
            'Ext.Img'
        ],
        config: { 
                  items: [
                        {
                            docked: 'bottom',
                            xtype: 'titlebar',
                            title: 'Getting Started'
                        },
    
    
    {
        xtype: 'image',
        mode: 'element',
        src : 'resources/loading/Homescreen.jpg',
    
    
    }
                    ]
                }
    });

  2. ok i found the trick.
    images must be located in 'resources/images/' folder . if i put it in another folder, it doesn't work on phone.

  3. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    43
    Vote Rating
    0
    Answers
    1
    fatfly is on a distinguished road

      0  

    Default


    ok i found the trick.
    images must be located in 'resources/images/' folder . if i put it in another folder, it doesn't work on phone.

Tags for this Thread