{ "id": "116699", "key": "AC-2708", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "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-07-03T18:08:58.000+0000", "created": "2013-07-01T18:13:51.000+0000", "labels": [ "android", "classname", "height", "regression", "tableviewrow" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:49.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "*Problem*\r\nSetting the height of TableView rows with classNames after creation no longer works in Android.\r\n\r\n*Expected behavior*\r\nPressing row 1 would toggle showing and hiding row 2. Pressing row 3 would toggle showing and hiding row 4.\r\n\r\n*Actual behavior*\r\nPressing row 1 or 3 does nothing, rows 2 and 4 stay hidden.\r\n\r\n*Note*\r\nThis is a regression in Titanium 3.1.1.GA, the same code works correctly in Titanium 3.1.0.GA. Removing the classNames from the rows isn't a workaround, as it will cause out of memory crashes on long tables. Using visible/show/hide to show and hide the rows instead of height isn't a workaround either, as this has never worked on Android.\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"#fff\"\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\ttop : 0,\r\n\tbottom : 0,\r\n\tleft : 0,\r\n\tright : 0\r\n});\r\n\r\nvar rows = [];\r\n\r\nvar firstRow = Ti.UI.createTableViewRow({\r\n\theight : '60dp',\r\n\tbackgroundColor : 'Red',\r\n\tclassName : 'rowType1'\r\n});\r\nfirstRow.add(Ti.UI.createLabel({\r\n\ttext : 'Row 1'\r\n}));\r\nfirstRow.addEventListener('click', function() {\r\n\tsecondRow.height = (secondRow.height === 0 ? '60dp' : 0);\r\n});\r\nrows.push(firstRow);\r\n\r\nvar secondRow = Ti.UI.createTableViewRow({\r\n\theight : 0,\r\n\tbackgroundColor : 'Gray',\r\n\tclassName : 'rowType2'\r\n});\r\nsecondRow.add(Ti.UI.createLabel({\r\n\ttext : 'Row 2'\r\n}));\r\nrows.push(secondRow);\r\n\r\nvar thirdRow = Ti.UI.createTableViewRow({\r\n\theight : '60dp',\r\n\tbackgroundColor : 'Red',\r\n\tclassName : 'rowType1'\r\n});\r\nthirdRow.add(Ti.UI.createLabel({\r\n\ttext : 'Row 3'\r\n}));\r\nthirdRow.addEventListener('click', function() {\r\n\tfourthRow.height = (fourthRow.height === 0 ? '60dp' : 0);\r\n});\r\nrows.push(thirdRow);\r\n\r\nvar fourthRow = Ti.UI.createTableViewRow({\r\n\theight : 0,\r\n\tbackgroundColor : 'Gray',\r\n\tclassName : 'rowType2'\r\n});\r\nfourthRow.add(Ti.UI.createLabel({\r\n\ttext : 'Row 4'\r\n}));\r\nrows.push(fourthRow);\r\n\r\ntable.setData(rows);\r\nwin.add(table);\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Setting heights on TableView rows with classNames after creation no longer works", "creator": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium 3.1.1.GA, Android 4.0.4", "comment": { "comments": [ { "id": "260781", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tested this on a Samsung Galaxy S2 Android 2.3.6; actually the opposite occurs to what you describe: The rows show/hide correctly on 3.1.1 GA, but not on 3.1 GA.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-03T18:08:58.000+0000", "updated": "2013-07-03T18:08:58.000+0000" }, { "id": "280651", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Fixed in 3.1.3", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-22T00:10:11.000+0000", "updated": "2013-11-22T00:10:11.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }