{ "id": "94711", "key": "AC-3122", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-08-13T06:50:08.000+0000", "created": "2012-07-10T03:54:40.000+0000", "labels": [ "2.1", "iOS", "labels", "tableview", "tableviewrow" ], "versions": [], "issuelinks": [], "assignee": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:11.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": "I have a custom labels/views/buttons/images in my rows. When displaying the TableView, all seems to be ok but when I scroll down to see more rows, they appears fine (images/buttons) except of the labels which seems to have like blank. I noticed that their alignment is wrong, like didn't rendered. If I set numbers into the width/height of the label, then it's ok but if I set Ti.UI.SIZE or Ti.UI.FILL it's bad.\r\nAnother strange behave is if I scroll down and up again then all scrolled labels becomes ok.\r\nAnother issue is if I rotate my device, the labels are not aligned ok, I need to rotate to landscape/portrait and scroll up/down and sometimes it's ok, but only part of the table.\r\nI'm using appendRow to add my custom rows (and I have not more than 30 rows anyway).\r\n\r\n*I'm attaching the next code sample and some screenshots + Video shows the problem.*\r\n\r\n{panel:title=app.js| borderStyle=dashed| borderColor=#ccc| titleBGColor=#F7D6C1| bgColor=#FFFFCE}\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Table Render Problems',\r\n \r\n backgroundColor:'yellow',\r\n orientationModes: [\r\n\t\tTi.UI.PORTRAIT,\r\n\t\tTi.UI.UPSIDE_PORTRAIT,\r\n\t\tTi.UI.LANDSCAPE_LEFT,\r\n\t\tTi.UI.LANDSCAPE_RIGHT\r\n\t]\r\n});\r\nwin1.open();\r\nTi.UI.iPhone.hideStatusBar({animated:false});\r\n\r\nvar totalCounter = 0;\r\nfunction getRowLink() {\r\n\tvar\trow = Ti.UI.createTableViewRow({\r\n\t\t\tlayout: 'vertical',\r\n\t\t\tselectionStyle: Ti.UI.iPhone.TableViewCellSelectionStyle.NONE,\r\n\t\t\tbackgroundColor: '#ccc',\r\n\t\t\theight: Ti.UI.SIZE,\r\n\t\t\tmoveable: true\r\n\t\t}),\r\n\t\tviewRow = Ti.UI.createView({\r\n\t\t\tlayout: 'vertical',\r\n\t\t\theight: Ti.UI.SIZE,\r\n\t\t\twidth: Ti.UI.SIZE,\t\t// <-- TRY TO PLAY WITH THIS LINE AS WELL (2.0+ Tweak) - NOTHING HELPS\r\n\t\t\ttop: 10, bottom: 0,\r\n\t\t\tright: 10, left: 10,\r\n\t\t\tbackgroundColor: 'red'\r\n\t\t}),\r\n\t\tviewItem = Ti.UI.createButton({\r\n\t\t\tlayout: 'absolute',\r\n\t\t\theight: 44,\r\n\t\t\tbackgroundColor: 'blue',\r\n\t\t\tstyle: Ti.UI.iPhone.SystemButtonStyle.PLAIN,\r\n\t\t\ttop: 0, bottom: 0, left: 0, right: 0\r\n\t\t});\r\n\r\n\tviewItem.add(Ti.UI.createLabel({\r\n\t\ttouchEnabled: false,\r\n\t\tcolor: '#fff',\r\n\t\tfont:{fontSize:16,fontWeight:'bold', fontFamily:'Arial'},\r\n\t\ttextAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT,\r\n\t\twidth: Ti.UI.FILL,\t\t\t// <-- TRY TO PLAY WITH THIS LINE AS WELL (2.0+ Tweak) - NOTHING HELPS\r\n\t\tleft:44, right: 6,\r\n\t\ttop:12,\r\n\t\theight:18,\r\n\t\ttext: 'TEST LINE - ' + (totalCounter++)\r\n\t}));\r\n\r\n\tviewRow.add(viewItem);\r\n\trow.add(viewRow);\r\n\r\n\treturn row;\r\n}\r\n\r\nvar myTable = Ti.UI.createTableView({editable: true});\r\n\r\nfor (var i=0; i < 50; i++) {\r\n\tmyTable.appendRow(getRowLink());\r\n};\r\n\r\nwin1.add(myTable);\r\n\r\n/*\r\n * Try to add --> \twidth: Ti.UI.SIZE \r\n * \t\t\t\t\twidth: Ti.UI.FILL\r\n * or just remove it...\r\n * Nothins helps :-(\r\n * \r\n * Please do not suggest to set a number for the width because that's not the idea, the idea is to keep the width changeable to it's space.\r\n * \r\n */\r\n{code}\r\n{panel} \r\n", "attachment": [ { "id": "30318", "filename": "IMG_1668.PNG", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T07:59:00.000+0000", "size": 29103, "mimeType": "image/png" }, { "id": "30319", "filename": "IMG_1669.PNG", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T07:59:00.000+0000", "size": 30495, "mimeType": "image/png" }, { "id": "30320", "filename": "IMG_1670.PNG", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T07:59:00.000+0000", "size": 24192, "mimeType": "image/png" }, { "id": "30321", "filename": "IMG_1671.PNG", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T07:59:00.000+0000", "size": 29980, "mimeType": "image/png" }, { "id": "30322", "filename": "IMG_1672.PNG", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T07:59:00.000+0000", "size": 27299, "mimeType": "image/png" }, { "id": "30323", "filename": "TableWidthRenderProblems.MOV", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T07:59:00.000+0000", "size": 3545132, "mimeType": "video/quicktime" } ], "flagged": false, "summary": "iOS: TableView with custom labels, blank until scrolled up/down from visible/invisible area.", "creator": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "Titanium Mobile v.2 - v2.1.1, iOS (not tested on Android)", "comment": { "comments": [ { "id": "208061", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\n\r\nCan you provide a code sample that reproduces the issue?\r\n\r\nRegards,\r\n\r\nBetty", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-17T09:07:53.000+0000", "updated": "2012-07-17T09:14:39.000+0000" }, { "id": "213118", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "*{color:red} Please review this critical bug again, I added some screenshots and even a video shows the problem{color}*", "updateAuthor": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T07:59:00.000+0000", "updated": "2012-08-07T07:59:00.000+0000" }, { "id": "213120", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Once again, it's working great on v1.8.0.1 (which currently on AppStore) and I can't move on to latest Titanium 2+ version :-(", "updateAuthor": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T08:03:04.000+0000", "updated": "2012-08-07T08:03:04.000+0000" }, { "id": "213140", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Btw, I tested provided code (remarking the iPhone parts) on the *{color:green}Android Emulator{color}* and it's not even showing the Labels... only blue rows... do you have any idea why?", "updateAuthor": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-07T08:45:42.000+0000", "updated": "2012-08-07T08:45:42.000+0000" }, { "id": "213512", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-09T04:39:08.000+0000", "updated": "2012-08-09T04:39:08.000+0000" }, { "id": "213533", "author": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "First of all it's a bug because it worked before and even following full layout changes, it doesn't really help.\r\n\r\nBut, you did help me :-)! ... mentioning the \"*ButtonView*\" problem on Android and seems to be like iOS has kind of \"*BUG*\" as for nesting *LabelView* inside the *Button* (because, again, it WORKED before!).\r\n\r\nSo, I played... trying to keep that *Button* I have (because I MUST have it as for as my complicated design), but what I did, instead of inserting all my *Labels + Images* inside that *Button*, I first insert all into new *View* and then I just added this new *View* into that *Button* (setting height/width to *Ti.UI.FILL*). Like that:\r\n{code}\r\nTable -->\r\n Row -->\r\n Button --> *NEW VIEW* -->\r\n Label\r\n Label\r\n ...\r\n\r\n{code}\r\n\r\n{color:blue}*That's SOLVED my problem !!!*{color}\r\n\r\nSo, Thanks to your help I found a \"Tweak\" but once again, it's a bug related to {color:red}nesting *Label* inside a *Button*{color}.\r\nAnybody who places a label inside a button inside a row of table will noticed that right away (and when you scroll up and down it suddenly \"fixed\").\r\n", "updateAuthor": { "name": "mry", "key": "mry", "displayName": "Yoram", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2012-08-09T08:30:52.000+0000", "updated": "2012-08-09T08:30:52.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }