{ "id": "101461", "key": "TIMOB-13320", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15396", "description": "2013 Sprint 07 Core", "name": "2013 Sprint 07 Core", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-04T18:01:35.000+0000", "created": "2012-09-18T20:10:24.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableviewrow", "parity", "qe-testadded", "triage" ], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:44.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": "*Problem description*\r\nA table with 2 table view sections, each section contains some rows, in each row there's a label and image view. When the user clicks on the image, the image should change to another one, and when the user clicks on the row it should change back. This causes 2 problems on Android only:\r\n\r\n1. If user keep click on selection 1 row image and then click on selection 2 same row image, the table will start to to act incorrectly (click on selection1 image row will change selection2 same row image).\r\n2. Sometimes when user click on the row, the image doesn't change back. \r\n\r\n*Steps to reproduce*\r\nJust keep tapping on these two section rows or images, you will see the problem.\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nvar tableView = Titanium.UI.createTableView();\r\n\r\ntableView.addEventListener(\"click\", function(e) {\r\n\tif (e.source.sw) {\r\n\t\te.row.children[1].image = '/KS_nav_views.png'\r\n\t} else {\r\n\t\te.row.children[1].image = '/KS_nav_ui.png'\r\n\t}\r\n\ttableView.setData(tableView.getData());\r\n\t//why I have to do this, in order to show the change\r\n});\r\n\r\nif (Ti.Platform.osname === 'iphone')\r\n\ttableView.style = Ti.UI.iPhone.TableViewStyle.GROUPED;\r\n\r\nvar tvs = [];\r\n//------------------------------- tvs1\r\ntvs[0] = Ti.UI.createTableViewSection({\r\n\theaderTitle : 'Selection 1'\r\n});\r\n//------------------------------- tvs2\r\ntvs[1] = Ti.UI.createTableViewSection({\r\n\theaderTitle : 'Selection 2'\r\n});\r\n\r\nfor ( i = 0; i < 2; i++) {\r\n\tfor ( j = 0; j < 3; j++) {\r\n\t\tvar label = Ti.UI.createLabel({\r\n\t\t\tleft : 8,\r\n\t\t\ttext : \"Label \" + j\r\n\t\t});\r\n\r\n\t\tvar imgSw = Ti.UI.createImageView({\r\n\t\t\tright : 2,\r\n\t\t\theight : 48,\r\n\t\t\twidth : 48,\r\n\t\t\timage : '/KS_nav_ui.png',\r\n\t\t\tsw : true\r\n\t\t});\r\n\r\n\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\theight : 48,\r\n\t\t\tclassName : 'row'\r\n\t\t});\r\n\r\n\t\trow.add(label);\r\n\t\trow.add(imgSw);\r\n\t\ttvs[i].add(row);\r\n\t}\r\n}\r\n\r\ntableView.setData(tvs);\r\nwin1.add(tableView);\r\nwin1.open(); \r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Image in table row doesn't change or changes on a wrong row", "creator": { "name": "jt", "key": "jt", "displayName": "JackieTai", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jt", "key": "jt", "displayName": "JackieTai", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OS: Win7, OSX\r\nIDE: Titanium Studio, build: 2.1.2.201208301612, 3.0.2\r\nTi API: 2.1.3 GA, 3.0.2 GA\r\nMID: Android 2.3.3, 2.3.6", "comment": { "comments": [ { "id": "219767", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-19T11:21:19.000+0000", "updated": "2012-09-19T11:21:19.000+0000" }, { "id": "219890", "author": { "name": "jt", "key": "jt", "displayName": "JackieTai", "active": true, "timeZone": "America/Los_Angeles" }, "body": "yes they're, but mine is more serious, because not only the image doesn't change, they'll change on a wrong row (click on one row image will change on other row image, usually on other table selection), I guess this is because I'm using more than on table selection.\r\n\r\nplease fix it.", "updateAuthor": { "name": "jt", "key": "jt", "displayName": "JackieTai", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-19T19:45:07.000+0000", "updated": "2012-09-19T19:45:07.000+0000" }, { "id": "245235", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed with 3.0.2 GA on Samsung Galaxy S2 Android 2.3.6. Also confirmed that it works fine on iOS 6 simulator.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-02T19:41:49.000+0000", "updated": "2013-04-02T19:41:49.000+0000" }, { "id": "245604", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reproduced with 3.0.2.GA on 2.2 Emulator. Cannot reproduce with 3.1.0 on Emulator or device.\r\nRemoving className on TableViewRow fixes the issue on 3.0.2.GA", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-03T23:16:20.000+0000", "updated": "2013-04-03T23:18:04.000+0000" }, { "id": "246383", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nSDK: 3.1.0.v20130405170202\r\nStudio:3.1.0.201304011603\r\nDevice: Samsung galaxy note(2.3.6)\r\nOS: OSX 10.7.5\r\n\r\nWorks as expected", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T08:29:01.000+0000", "updated": "2013-04-08T08:29:01.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }