Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23126

iOS Device: Remote Images in ListView will not download until user stop scrolling

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Invalid
    • Affects Version/s: Release 5.2.0, Release 5.2.1
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS Device 9.2
      iOS Simulator 9.2
      Xcode 7.2
      Appcelerator SDK 5.2.1.GA

      Description

      Issue description

      Remote Images in ListView will not download until user stop scrolling.

      Steps to Replicate
      1. Create a new apcelerator default classic project
      2. Open the app.js file
      3. Replace the content with the next code:

        ///create component instance
            var win = Ti.UI.createWindow({
                backgroundColor : '#000',
                navBarHidden : false,
                layout : 'vertical'
            });
         
            var Template = {
                properties: {height: 40},
                 events: {click: function(e) { 
                 var item = e.section.getItemAt(e.itemIndex);
                     var data = item.info.text;
                if(data=='Location services')
                {
                alert("you click Location services");
                }
                 else if(data=="Lock Screen")
                {
                alert("you click Lock Screen");
                }
                else if(data=="Security")
                {
                    alert("you click Security");
                }
                else
                {
                    alert("you click Language");
                }
         
              }},
                childTemplates: [
                {
                    type: 'Ti.UI.ImageView', // Use an image view for the image
                    bindId: 'pic',           // Maps to a custom pic property of the item data
                    properties: {            // Sets the image view  properties
                        width: '50dp', height: '50dp', left: 10
                    }
                },
         
                {                            // Subtitle
                    type: 'Ti.UI.Label',     // Use a label for the subtitle
                    bindId: 'info',       // Maps to a custom es_info property of the item data
                    properties: {            // Sets the label properties
                        color: 'gray',
                        font: { fontFamily:'Arial', fontSize: '20dp' },
                        left: '70dp',
                    }
                }
            ]};
         
            var section = Ti.UI.createListSection({});
            var listView = Ti.UI.createListView({
                templates: { 'temp': Template},
                sections: [ section ]
            });
         
        //Input data set here
         
            var data = [
            {template:'temp', properties:{height:40},pic: {image: 'http://media.sdfirealarms.co.uk/media/catalog/product/cache/6/image/500x500/fbcb73186cd05db6dad7b3600e4e2dc4/F/E/FEX18_3.jpg'},info:{text:'Location services'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.customtablefelt.com/images/nhl-logo-100x100.jpg'},info:{text:'Lock Screen'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.clker.com/cliparts/R/S/Z/4/t/f/crossed-hammers-bw-100x100-md.png'},info:{text:'Security'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.ebooks-gratuit.com/images/avatars/Husky-Logo-100x100_full[7885].gif'},info:{text:'Language'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://media.sdfirealarms.co.uk/media/catalog/product/cache/6/image/500x500/fbcb73186cd05db6dad7b3600e4e2dc4/F/E/FEX18_3.jpg'},info:{text:'Location services'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.customtablefelt.com/images/nhl-logo-100x100.jpg'},info:{text:'Lock Screen'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.clker.com/cliparts/R/S/Z/4/t/f/crossed-hammers-bw-100x100-md.png'},info:{text:'Security'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.ebooks-gratuit.com/images/avatars/Husky-Logo-100x100_full[7885].gif'},info:{text:'Language'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://media.sdfirealarms.co.uk/media/catalog/product/cache/6/image/500x500/fbcb73186cd05db6dad7b3600e4e2dc4/F/E/FEX18_3.jpg'},info:{text:'Location services'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.customtablefelt.com/images/nhl-logo-100x100.jpg'},info:{text:'Lock Screen'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.clker.com/cliparts/R/S/Z/4/t/f/crossed-hammers-bw-100x100-md.png'},info:{text:'Security'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.ebooks-gratuit.com/images/avatars/Husky-Logo-100x100_full[7885].gif'},info:{text:'Language'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://media.sdfirealarms.co.uk/media/catalog/product/cache/6/image/500x500/fbcb73186cd05db6dad7b3600e4e2dc4/F/E/FEX18_3.jpg'},info:{text:'Location services'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.customtablefelt.com/images/nhl-logo-100x100.jpg'},info:{text:'Lock Screen'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.clker.com/cliparts/R/S/Z/4/t/f/crossed-hammers-bw-100x100-md.png'},info:{text:'Security'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.ebooks-gratuit.com/images/avatars/Husky-Logo-100x100_full[7885].gif'},info:{text:'Language'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://media.sdfirealarms.co.uk/media/catalog/product/cache/6/image/500x500/fbcb73186cd05db6dad7b3600e4e2dc4/F/E/FEX18_3.jpg'},info:{text:'Location services'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.customtablefelt.com/images/nhl-logo-100x100.jpg'},info:{text:'Lock Screen'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.clker.com/cliparts/R/S/Z/4/t/f/crossed-hammers-bw-100x100-md.png'},info:{text:'Security'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.ebooks-gratuit.com/images/avatars/Husky-Logo-100x100_full[7885].gif'},info:{text:'Language'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://media.sdfirealarms.co.uk/media/catalog/product/cache/6/image/500x500/fbcb73186cd05db6dad7b3600e4e2dc4/F/E/FEX18_3.jpg'},info:{text:'Location services'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.customtablefelt.com/images/nhl-logo-100x100.jpg'},info:{text:'Lock Screen'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.clker.com/cliparts/R/S/Z/4/t/f/crossed-hammers-bw-100x100-md.png'},info:{text:'Security'}},
            {template:'temp', properties:{height:40},pic: {image: 'http://www.ebooks-gratuit.com/images/avatars/Husky-Logo-100x100_full[7885].gif'},info:{text:'Language'}}, 
         
            ];
         
            section.setItems(data);
         
            win.add(listView);
         
            win.open();
        

      4. Run for simulator or device
      5. Star to scroll before the Images are downloaded
      6. Once you finish the scroll the images are loaded
      Expected behavior

      The images should be downloaded at the same time the user is scrolling

        Attachments

          Activity

            People

            • Assignee:
              apetkov Angel Petkov
              Reporter:
              rramirez Ricardo Ramirez
              Reviewer:
              Angel Petkov
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-9581
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration