{ "id": "78903", "key": "TIMOB-4948", "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": "12083", "description": "", "name": "Sprint 2011-43", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-10-27T14:34:08.000+0000", "created": "2011-08-08T05:43:18.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "clipping", "tableviewrow", "width" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [ { "id": "13656", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "80115", "key": "TIMOB-5238", "fields": { "summary": "Android: remove padding on sides of tableView", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-11-08T09:39:02.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": "Adding a new View to a TableViewRow results in unexpected clipping on the left and right side of the cell regardless of the size of the view added.\r\n\r\nExpected behavior: the new view fills 100% width and height of the parent view (the tableviewrow) without any clipping.\r\nExperienced behavior: on a tableviewrow with a with of 240px, approx. 5 pixel on the left and approx. 7 pixel on the right are clipped thus revealing the background color of the tableviewrow.\r\n\r\nI provided a simple test case that will work as 'app.js' in a standard project and a screenshot that shows the result I get. Please pay extra attention to the background colors I specify in the example code and how they appear in the screenshot or in the result of running the example code. One would expect to not see a single pixel of red color.\r\n\r\nAs far as I could see, this bug appears only on Android and not on the iPhone.\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\nvar win = Titanium.UI.createWindow({ \r\n exitOnClose: true,\r\n fullscreen: true,\r\n orientationModes: [Ti.UI.PORTRAIT],\r\n backgroundColor: 'green'\r\n});\r\n \r\nrows = [];\r\nfor(i = 0; i < 20; i++) {\r\n rows[i] = Ti.UI.createTableViewRow({\r\n height: 40,\r\n backgroundColor: 'red'\r\n });\r\n var view = Ti.UI.createView({\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: 'orange'\r\n });\r\n rows[i].add(view);\r\n}\r\n \r\nvar table = Ti.UI.createTableView({\r\n top: 40,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n data: rows\r\n});\r\nwin.add(table);\r\n \r\nwin.open();\r\n{code}\r\n\r\n!http://www.pardeike.net/tabletest.png! ", "attachment": [], "flagged": false, "summary": "Cannot fill a tableViewRow with another view to 100% width (clipping)", "creator": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Mobile 1.7.2 (07/21/11 09:36 97c3689)\r\nAndroid 2.2.1 on HTC Desire\r\nAndroid 2.3.3 on a HVGA emulator", "comment": { "comments": [ { "id": "162131", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Andreas\r\n\r\nThanks for the ticket, which is almost perfect. Would you mind please stating the Titanium SDK build date and hash, so that the core devs can be certain of reproducing the issue? Once this is added to the environment field, I can move this ticket across.\r\n\r\nMany thanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-08T07:58:35.000+0000", "updated": "2011-08-08T07:58:35.000+0000" }, { "id": "162217", "author": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Done.", "updateAuthor": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-09T08:06:16.000+0000", "updated": "2011-08-09T08:06:16.000+0000" }, { "id": "162221", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Andreas\r\n\r\nSorry I missed this before, but Android 2.2.1 is obsolete. Would you update to the latest 2.2.X release, and test again? Refer to [Android SDK / Target Android Platform|http://wiki.appcelerator.org/display/guides/Titanium+Compatibility+Matrix#TitaniumCompatibilityMatrix-AndroidSDK%2FTargetAndroidPlatform] if you are going to upgrade to a newer major release.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-09T10:28:04.000+0000", "updated": "2011-08-09T10:28:04.000+0000" }, { "id": "162222", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Hi Andreas.\r\n\r\n\r\nHave you tried workaround that I suggested to you in Q/A topic? :)", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-08-09T11:09:14.000+0000", "updated": "2011-08-09T11:09:14.000+0000" }, { "id": "162223", "author": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@PaulDowsett: Bug still present after testing with Android 2.3.3. This seems not to be android version specific.\r\n\r\n@IvanSkugor: I am not sure if I understand your comment there. You're suggesting that I use the TableViewCell directly instead of adding a new View? That is hardly a workaround because most non-trivial cases of table cell layouts probably require one to have several views/components in that cell - in my case, I want a rectangular area with a background png for the top part of the cell containing a centered label and then some text below the rectangular header. I cannot see a way to do what you suggested without adding several elements to the TableViewCell which will then clip that content on the left and right where in fact, it should not clip anything at all.", "updateAuthor": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-09T11:26:16.000+0000", "updated": "2011-08-09T11:26:16.000+0000" }, { "id": "162224", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yes, that was my suggestion (but \"TableViewRow\", not \"TableViewCell\").\r\n\r\nIf I understand correctly what you want, I think that you need to use \"layout: vertical\" for \"TableViewRow\", in combination with other components.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-08-09T11:37:53.000+0000", "updated": "2011-08-09T11:37:53.000+0000" }, { "id": "162226", "author": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Exactly. That is what I am trying to do in my real project:\r\n\r\n{code}\r\nvar row = Ti.UI.createTableViewRow({\r\n\tclassName: 'row',\r\n\tselectionStyle: Titanium.UI.iPhone.TableViewCellSelectionStyle.GRAY,\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar titleView = Ti.UI.createView({\r\n\tid: 'titleView',\r\n\tbackgroundImage: 'images/jobtitlebg.png'\r\n});\r\nvar titleLabel = Ti.UI.createLabel({\r\n\tclassName: 'jobtext',\r\n\tid: 'titleLabel',\r\n\ttext: rssTitle\r\n});\r\ntitleView.add(titleLabel);\r\nvar titleArrow = Ti.UI.createView({\r\n\tid: 'titleArrow',\r\n\tbackgroundImage: 'images/pil.png'\r\n});\r\ntitleView.add(titleArrow);\r\nrow.add(titleView);\r\n\r\nvar descriptionLabel = Ti.UI.createLabel({\r\n\tid: 'descriptionLabel',\r\n\tclassName: 'jobtext',\r\n\ttext: rssDescription\r\n});\r\nrow.add(descriptionLabel);\r\n\r\nvar createDateLabel = Ti.UI.createLabel({\r\n\tid: 'createDateLabel',\r\n\tclassName: 'jobtext',\r\n\ttext: deltaDays\r\n});\r\nrow.add(createDateLabel);\r\n{code}\r\n\r\nI cannot find a workaround that prevents clipping of 'titleView'...", "updateAuthor": { "name": "pardeike", "key": "pardeike", "displayName": "Andreas Pardeike", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-09T11:44:02.000+0000", "updated": "2011-08-09T11:44:02.000+0000" }, { "id": "167544", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "I'm having the exact same problem. I have my tableview line separator set to 'transparent' so I can draw my own... except they're clipping on the left/right sides now.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2011-10-01T12:47:06.000+0000", "updated": "2011-10-01T12:47:06.000+0000" }, { "id": "171695", "author": { "name": "shamsulazhar", "key": "shamsulazhar", "displayName": "Shamsul Azhar", "active": true, "timeZone": "Asia/Kuala_Lumpur" }, "body": "Can I know which bug is this a duplicate of so that I can track it's progress. I'm having the same issue with my project.\r\n\r\nThanks.", "updateAuthor": { "name": "shamsulazhar", "key": "shamsulazhar", "displayName": "Shamsul Azhar", "active": true, "timeZone": "Asia/Kuala_Lumpur" }, "created": "2011-11-06T04:09:53.000+0000", "updated": "2011-11-06T04:09:53.000+0000" }, { "id": "171855", "author": { "name": "judeosborn", "key": "judeosborn", "displayName": "Jude Osborn", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is proving to be a major visual problem for my company's app. Does anyone know if this has been confirmed as a Titanium bug, or if it's an OS limitation?", "updateAuthor": { "name": "judeosborn", "key": "judeosborn", "displayName": "Jude Osborn", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-07T22:04:21.000+0000", "updated": "2011-11-07T22:04:21.000+0000" }, { "id": "171903", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "the ticket his one is linked to shows that it's resolved. ", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-08T09:39:02.000+0000", "updated": "2011-11-08T09:39:02.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }