{ "id": "61148", "key": "TIMOB-516", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:21.000+0000", "created": "2011-04-15T02:30:44.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "iphone", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:21.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
from community - rows get cut off/jacked up
\nsee ticket:
\nhttp://helpdesk.appcelerator.net/tickets/1398
code:
\nvar win = Titanium.UI.createWindow();
\nwin.setBackgroundColor('#EAF6C4');
\nvar e = Titanium.UI.createButton({
\nstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED,\nsystemButton:Titanium.UI.iPhone.SystemButton.REFRESH
\n
\n}); win.setRightNavButton(e);
\n// var URL = \"http://localhost/~neps/test.json\";\n// var URL = \"http://gothamist.com/js/staticRecentEntries.json\";\nvar URL = \"http://twitter.com/status/user_timeline/sxswist.json?count=30\";
\nfunction fetchRows()\n{\nvar data = [];\nvar xhr = Titanium.Network.createHTTPClient();\nxhr.onload = function()\n{\n // convert the response JSON text into a JavaScript object\n var entry = eval('(' + this.responseText + ')');\n\n for (var i=0;i<entry.length;i++)\n {\n var row = Ti.UI.createTableViewRow();\n row.height ='auto';\n row.hasChild = true;\n row.className = 'normal'\n\n var comment = Ti.UI.createLabel({\n color:'#222',\n font:{fontSize:16,fontWeight:'normal', fontFamily:'Helvetica'},\n left:10,\n right:10,\n top:10,\n bottom:10,\n height:'auto',\n width:'auto', \n text:entry[i].text\n });\n comment.rowNum = i;\n row.add(comment);\n\n var url = 'http://twitter.com/sxswist/status/' + entry[i].id;\n row.url = url; \n\n data.push(row);\n }\n // hide loader\n toolActInd.hide();\n win.setToolbar(null,{animated:true});\n\n // since this is the first page, just set the data since we started out empty\n tableView.setData(data);\n}\nxhr.open(\"GET\",URL);\nxhr.send(null);\n};\n\nvar tableView = Titanium.UI.createTableView();\n\nvar toolActInd = Titanium.UI.createActivityIndicator();\ntoolActInd.style = Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN;\ntoolActInd.font = {fontFamily:'Helvetica Neue', fontSize:15,fontWeight:'bold'};\ntoolActInd.color = 'white';\ntoolActInd.message = 'Loading...';\n//loader start\nwin.setToolbar([toolActInd],{animated:true});\ntoolActInd.show();\n//loader end\n\ntableView.addEventListener('click', function(e)\n{\n\n var rowdata = e.row;\n var w = Ti.UI.createWindow({title:'@sxswist',barColor:'#A2CF18'});\n var webview = Ti.UI.createWebView();\n webview.url = rowdata.url;\n webview.addEventListener('load',function(e)\n {\n Ti.API.debug(\"webview loaded: \"+e.url);\n });\n w.add(webview);\n win.tab.open(w);\n});\n\nwin.add(tableView); \nfetchRows();\n\ne.addEventListener('click', function()\n{\n //loader start\n win.setToolbar([toolActInd],{animated:true});\n toolActInd.show();\n //loader end\n tableView.setData([]);\n setTimeout(function()\n {\n fetchRows();\n },1000)\n});
\n
\nwin.open();
valid, needs test case.
\nThe issue is seen when scrolling the list, then revealing the\npreviously scrolled objects. Occurs on simulator and device.
added screenshot
What's the status of this ticket? This bug is a very big\neyesore.
This ticket is still marked 'new' and is not marked as a\npriority bug for 1.5.0 currently. There has been no work done on it\nbut we will fix it before release if there's time.
I still feel like this ticket should be at higher priority due\nto the number of watchers listed at the side. I noticed in 1.4.0rc1\nthat it was fixed momentarily, then after the 1.4.0 official push\nupdate, the bug came right back to haunt us.
Do you have any additional information about where this was\nfixed, and then broken again? There was a very wide gap between rc1\nand the 1.4.0 drop.
Here's a test case:
\nvar win = Titanium.UI.currentWindow; var table =\nTi.UI.createTableView(); data = []; for (var i=0; i < 40; i++)\n{
\n var row = Ti.UI.createTableViewRow({layout:'vertical', height: 'auto'});\n var t = \"\"; \n for (var j=0; j < i; j++) t += \"test \";\n row.add (Ti.UI.createLabel({ height: 'auto', width: 'auto', text: t }));\n row.add (Ti.UI.createLabel({ height: 'auto', width: 'auto', text: t }));\n data.push(row);
\n
\n}
\ntable.setData(data); win.add(table);
It appears that the bug will present when there are many\nvertical layout rows with height set to auto, each with multiple\nlabels added to them with their heights set to auto, and when each\nrow has a different height. Scrolling all the way to the bottom and\nback to the top with my test code above will reproduce the bug. See\nthe attached screenshot of my simulator.
This issue also pops up when you create a single label over 5\nlines and attach it to a tableViewRow with AutoHeight. The label at\nfirst is terminated with '...' then when scrolled off the page and\nback, the rest of the text shows up but is drawn outside the\ntableview row.
Fixed as part of tableview/view refactoring, duplicate of... a\nbillion other bugs.