{ "id": "90374", "key": "TIMOB-8764", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-04-26T16:30:24.000+0000", "created": "2012-04-17T11:28:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-04-26T16:30:24.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": "h3. Problem\r\n\r\nCurrently, when an index is present as the right sidebar on iOS, the row contents are sized to respect it and the header/footer views are not. The \"correct\" behavior is apparently to resize contents, based on the behavior of the row contents view as flexible sized. Changing behavior of row sizing may be perceived as a regression, or should be a configurable property (new property, possibly a separate feature request.)\r\n\r\nh3. Test\r\n----\r\n{code:title=\"app.js\"}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n \r\n\r\nvar header = Ti.UI.createView({\r\n\theight:Ti.UI.SIZE,\r\n\tbackgroundColor:'green'\r\n});\r\nheader.add(Ti.UI.createLabel({\r\n\ttext:\"Fold Goggold Jeff Goldgate Jeff Jeffgold Foldgold Blumgold Cool Jeffjeff Gatecool Game Coolcold Blum Gateblum Coolgold Goldjeff Game Gamegame Gate Oldgold Jeff Goldblast Jeff Gotgamesgold. Cool cool cool game.\",\r\n\ttop:0,\r\n\theight:Ti.UI.SIZE\r\n})); \r\n\r\nvar footer = Ti.UI.createView({\r\n\theight:Ti.UI.SIZE,\r\n\tbackgroundColor:'red'\r\n});\r\nfooter.add(Ti.UI.createLabel({\r\n\ttext:\"Gold Blumblum Gamegold Jeff Goldgame Gold Coolgold Jeffgame Coolgame Game Jeffgate Blum Gamegate Gatefold Done Gonegame Game Goldblast Gold Blum Coldgold Goldgame Old Gatefold Blastgame Foldgame.\",\r\n\ttop:0,\r\n\theight:Ti.UI.SIZE\r\n})); \r\n\r\nvar row1 = Ti.UI.createTableViewRow({\r\n    // height:'auto',   \r\n    height:Ti.UI.SIZE\r\n \r\n});\r\nvar label1 = Ti.UI.createLabel({\r\n    // height:'auto',\r\n    top:0,\r\n    height:Ti.UI.SIZE,\r\n    text:'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'\r\n});\r\n \r\nrow1.add(label1);\r\n \r\nvar row2 = Ti.UI.createTableViewRow({\r\n    // height:'auto',   \r\n    height:Ti.UI.SIZE\r\n});\r\nvar label2 = Ti.UI.createLabel({\r\n    // height:'auto',   \r\n    height:Ti.UI.SIZE,\r\n    top:0,\r\n    text:'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'\r\n});\r\n \r\nrow2.add(label2);\r\n \r\n \r\nvar table = Ti.UI.createTableView({\r\n    index:[{index:0,title:'a'},{index:1,title:'b'}],\r\n    data:[row1,row2],\r\n\theaderView:header,\r\n\tfooterView:footer\r\n});\r\n \r\nwin.add(table);\r\n{code}\r\n----\r\nh3. Expected\r\n\r\n* Header, footer, and rows all have the same width\r\n\r\nh3. Actual\r\n\r\n* Header and footer span the whole row (320 dip) and rows span width only up until the left margin of the index (~270 dip)", "attachment": [ { "id": "27429", "filename": "Screenshot 2012.04.26 16.21.44.png", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T16:22:25.000+0000", "size": 73189, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Table view sizes width of headers/footers differently from row contents", "creator": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "192841", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Screenshot from Apple's own Contacts app", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T16:22:25.000+0000", "updated": "2012-04-26T16:22:25.000+0000" }, { "id": "192843", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm not sure if this is a valid issue. Consider the purpose of the headers and footers versus row contents: The former includes graphics and styles that help frame the table view, the latter is only conveying data; the row itself is full-width.\r\n\r\nI've included a screenshot from Apple's own Contacts app as a demonstration. The index is on the side, and the long C name honors the index by truncating early. However, the table's own header, the headers of the sections, and the row dividers themselves (See the t section) are fully the width of the screen.\r\n\r\nProposing we mark this invalid.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T16:25:53.000+0000", "updated": "2012-04-26T16:25:53.000+0000" }, { "id": "192847", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It looks like it is actually an HIG violation to extend row content underneath the index. \r\n\r\nbq. If you include an index, avoid using table-view elements that display on the right edge of the table (such as the disclosure indicator), because these elements interfere with the index.\r\n\r\nClosing this ticket as INVALID.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T16:28:57.000+0000", "updated": "2012-04-26T16:30:03.000+0000" }, { "id": "192849", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "HIG violation.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T16:30:24.000+0000", "updated": "2012-04-26T16:30:24.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }