{ "id": "108359", "key": "TIMOB-12588", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-03-13T12:43:33.000+0000", "created": "2013-01-22T02:55:34.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Community" ], "versions": [], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T21:31:57.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h6.Problem \r\nWhen imageView in TableViewRow and Android, setImage doesn't work (just work 1st time).\r\n\r\nh6.Tested on\r\niOS 6 simulator\r\nRazr Droid OS 2.3.5\r\n\r\nh6.To reproduce\r\nrun below example, click row multiple times.\r\n\r\nh6.Snippet code\r\n{code:javascript} \r\nvar win = Ti.UI.createWindow({\r\nbackgroundColor : 'white'\r\n});\r\n\r\nvar table = Ti.UI.createTableView();\r\nvar row = Ti.UI.createTableViewRow({\r\n height : 100\r\n});\r\nvar img = Ti.UI.createImageView({\r\n width : 100,\r\n height : 100\r\n});\r\n\r\nrow.add(img);\r\ntable.data = [row];\r\nwin.add(table);\r\nwin.open();\r\n\r\nvar srcs = [\r\n \"http://t3.gstatic.com/images?q=tbn:ANd9GcQUkHHr21JB_gUXFHFVe-uXFEG2M3D25Vy6DWaifLf_1pZkwwfGkg\",\r\n \"http://t0.gstatic.com/images?q=tbn:ANd9GcQ2hy-N72tStiinhPW1qUPT3kduibk-e5ufAeZtq3NI9GPRsLCl\",\r\n \"http://t2.gstatic.com/images?q=tbn:ANd9GcSZLz8YqLQYatlgtRIR8qQ0Dl6tD1AoR1NYby8zJbBln1oX55UE\",\r\n \"http://t3.gstatic.com/images?q=tbn:ANd9GcTSZ7Rg1kzKjqtvf06-aDgQHCvE7SKB6uh_JIdfy_e4Jj-cPuiy\"\r\n];\r\n\r\nvar index=0;\r\ntable.addEventListener('click',function(e){ \r\n var src = srcs[(index++)%4];\r\n Ti.API.info(src);\r\n img.setImage(src); //doesn't work! (just work 1st setImage)\r\n //img.setBackgroundImage(src); //work!\r\n});\r\n{code}\r\n\r\nh6.Additional info\r\n\r\n- When imageView in window, setImage work every time.\r\n\r\n{code:javascript} \r\nvar win = Ti.UI.createWindow({\r\nbackgroundColor : 'white'\r\n});\r\n\r\nvar img = Ti.UI.createImageView({\r\n width : 100,\r\n height : 100\r\n});\r\nwin.add(img);\r\nwin.open();\r\n\r\nvar srcs = [\r\n \"http://t3.gstatic.com/images?q=tbn:ANd9GcQUkHHr21JB_gUXFHFVe-uXFEG2M3D25Vy6DWaifLf_1pZkwwfGkg\",\r\n \"http://t0.gstatic.com/images?q=tbn:ANd9GcQ2hy-N72tStiinhPW1qUPT3kduibk-e5ufAeZtq3NI9GPRsLCl\",\r\n \"http://t2.gstatic.com/images?q=tbn:ANd9GcSZLz8YqLQYatlgtRIR8qQ0Dl6tD1AoR1NYby8zJbBln1oX55UE\",\r\n \"http://t3.gstatic.com/images?q=tbn:ANd9GcTSZ7Rg1kzKjqtvf06-aDgQHCvE7SKB6uh_JIdfy_e4Jj-cPuiy\"\r\n];\r\n\r\nvar index=0;\r\nwin.addEventListener('click',function(e){ \r\n var src = srcs[(index++)%4];\r\n Ti.API.info(src);\r\n img.setImage(src);\r\n});\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Change image property of imageView doesn't work in tableviewRow", "creator": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "subtasks": [], "reporter": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "environment": "Ti SDK 3.0.0GA\r\nAndroid 2.x & 4.x\r\niOS 6\r\nOSx 10.8.2", "comment": { "comments": [ { "id": "236988", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello JongEun,\n\nI did test _setImage_ worked just once. Tested _setBackgroundImage_ method which achieves the same result but multiple times.\n\nWhat would be the need to use setImage then?", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-02T01:36:37.000+0000", "updated": "2013-02-02T01:36:37.000+0000" }, { "id": "237203", "author": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "body": "When you use setBackgroundImage instead of setImage in TableView, Tableview have a scroll performance problem. 'setBackgroundImage' is too slower then 'setImage'.", "updateAuthor": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2013-02-05T06:34:07.000+0000", "updated": "2013-02-05T06:34:07.000+0000" }, { "id": "241950", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces with\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\r\nDevice: Samsung galaxy s duos Android version: 4.0.4", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-13T12:43:33.000+0000", "updated": "2013-03-13T12:43:33.000+0000" }, { "id": "414460", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:31:57.000+0000", "updated": "2017-03-21T21:31:57.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }