Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23669] ListView Images are displaying incorrectly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2016-10-03T15:50:45.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sn/a
ComponentsiOS
Labelsimageview, listview, qe-5.4.0, regression
ReporterBert Grantges
AssigneeHans Knöchel
Created2016-07-21T12:17:37.000+0000
Updated2017-03-20T22:26:10.000+0000

Description

I noticed that when building the Corporate Directory app with 5.4.0.Beta, that the images in the list view change unexpectedly when refreshing the ListView content. Steps to reproduce. - Open Studio - Import Corporate Directory App - Open tiapp.xml - Change the current Ti SDK version to 5.4.0.v20160712013704 - Build the Corporate Directory app for iOS - Once the app loads and displays the directory, swipe left on any contact and add that contact as a favorite Notice that the images for contacts (driven by remote url) change unexpectedly. Under the covers all that is happening, is that the data of the listView is refreshed

Attachments

FileDateSize
listview-issue.mp42016-07-21T12:24:08.000+00001692875

Comments

  1. Chee Kiat Ng 2016-07-21

    [~bgrantges@appcelerator.com] do you know if this is specific to corporate directory or list view in general? And if it is only on iOS?
  2. Hans Knöchel 2016-07-21

    Not happening in 5.3.1.GA? Only remote images? And is there a repo for the project? Would be good to extract the bug from the example application. *EDIT*: Only related change I can think of is [this one](https://github.com/appcelerator/titanium_mobile/commit/a2ce6d1dfac7d75d73ad66656ffbe11200061db3).
  3. Hans Knöchel 2016-07-27

    [~htbryant] Can you validate that this is not reproducible with 5_4_X anymore? I'm pretty sure it's fixed along with TIMOB-20204.
  4. Harry Bryant 2016-07-27

    [~hansknoechel] issues with the images in the ListView are no longer reproducible with the latest 5_4_X build. Tested On: iPhone 6S (9.3.2) Device & iPhone 6 Plus (8.3) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160727094731 Appc Studio: 4.7.0.201607111053 Appc NPM: 4.2.7 App CLI: 5.4.0-34 Xcode 7.3 Node v4.4.7 *Closing ticket.*
  5. Hans Knöchel 2016-09-01

    There is a regression for certain template-types that are preventing imageview-subviews from being clicked correctly. Further investigation is coming. Test-case (ensure to run on kroll-thread / disable main-thread to reproduce):
       var toggle = false;
       var win = Ti.UI.createWindow();
       
       var myTemplate = {
           childTemplates: [{
               type: 'Ti.UI.TextField',
               bindId: 'field', 
               properties: {
                   width: 200, 
                   height: 30, 
                   left: 20,
                   backgroundColor: "#f0f0f0"
               }
           },{
               type: 'Ti.UI.View',
               properties: {
                   right: 20,
                   width: 40, 
                   height: 40, 
                   borderRadius: 20,
                   borderWidth: 1,
                   borderColor: "#000"
               },
               childTemplates: [{
                   type: 'Ti.UI.ImageView',
                   bindId: 'image', 
                   properties: {
                       width: 25, 
                       height: 25
                   },
                   events: {
                       "click": handleImageClick
                   }
               }]
           }]
       };
       
       var list = Ti.UI.createListView({
           defaultItemTemplate: "DefaultCellTemplate",
           templates: { "DefaultCellTemplate": myTemplate },
           allowsSelection: false,
           sections: [Ti.UI.createListSection({
               items: [{
                   properties: {
                       height: 50
                   },
                   field: {
                       hintText: "Enter value"
                   },
                   image: {
                       image: "images/cloud.png"
                   }
               },{
                   properties: {
                       height: 50
                   },
                   field: {
                       hintText: "Enter value"
                   },
                   image: {
                       image: "images/cloud.png"
                   }
               }]
           })]
       });
       
       function handleImageClick(e) {
           toggle = !toggle;
           var item = e.section.getItemAt(e.itemIndex);
           item.image.image = "images/" + (toggle ? "cloud" : "chat") + ".png"; // Toggles the image on every click
           
           e.section.updateItemAt(e.itemIndex, item);
       };
       
       win.add(list);
       win.open();
       
  6. Hans Knöchel 2016-10-03

    The regression is a duplicate of TIMOB-23973.
  7. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source