{ "id": "136229", "key": "TIMOB-19525", "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": "2016-10-19T15:42:20.000+0000", "created": "2014-09-08T18:50:54.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "TCSupportTriage", "ios", "listview", "tableview", "vertical_layout" ], "versions": [ { "id": "16919", "description": "Critical updates", "name": "Release 4.1.1", "archived": true, "released": true, "releaseDate": "2015-07-15" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:03:12.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": "Run the code below. You will see the ListView and TableView get cut short by exactly the offset in the vertical layout (e.g. if the ListView is specified with top:20 then 20 points will be cut off at its bottom).\r\n\r\n{code}\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor : 'white',\r\n layout: 'vertical' // causes the bug\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({top: 0, text: 'Do you see 20 tableview rows?', font: {fontSize: '16dp'}, height: 50, color: 'black'});\r\nwin1.add(label1);\r\nvar tableData = [];\r\nfor (var i = 1; i <= 20; i++) {\r\n\ttableData.push({title: 'table row' + i});\r\n}\r\n\r\n// The tableview will be cut at the bottom by 100 points\r\nvar table = Ti.UI.createTableView({ data: tableData, top: 100});\r\nwin1.add(table);\r\n\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n backgroundColor : 'white',\r\n layout: 'vertical' // causes the bug\r\n});\r\nvar label2 = Ti.UI.createLabel({top: 0, text: 'Do you see 20 listview rows?', font: {fontSize: '16dp'}, height: 50, color: 'black'});\r\nwin2.add(label2);\r\n// the listview will be cut by 100 points\r\nvar listView = Ti.UI.createListView({top: '100dp'});\r\nvar section = Ti.UI.createListSection(); \r\nvar sections = [];\r\nvar data = [];\r\n\r\nfor (var i = 1; i <= 20; i++) {\r\n\tdata.push({properties : {title : 'listview row ' + i}});\r\n}\r\nsection.setItems(data);\r\nsections.push(section);\r\nlistView.sections = sections;\r\n\r\nwin2.add(listView);\r\n\r\nvar win3 = Ti.UI.createWindow({\r\n backgroundColor : 'white',\r\n layout: 'absolute' // OK\r\n});\r\n\r\nvar label3 = Ti.UI.createLabel({top: 0, text: 'Absolute layout so we see 20 rows', font: {fontSize: '16dp'}, height: 50, color: 'black'});\r\nwin3.add(label3);\r\nvar tableData3 = [];\r\nfor (var i = 1; i <= 20; i++) {\r\n\ttableData3.push({title: 'table row' + i});\r\n}\r\n// since in absolute layout, this tableview will look OK\r\nvar table3 = Ti.UI.createTableView({ data: tableData3, top: 100});\r\nwin3.add(table3);\r\n\r\nvar tab1 = Ti.UI.createTab({title: 'BUG1', window: win1});\r\nvar tab2 = Ti.UI.createTab({title: 'BUG2', window: win2});\r\nvar tab3 = Ti.UI.createTab({title: 'OK', window: win3});\r\nvar tabgroup = Ti.UI.createTabGroup({tabs: [tab1, tab2, tab3]});\r\ntabgroup.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: ListView/TableView in a container with \"vertical\" layout is cut off", "creator": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "iOS simulators and devices, SDK 3.5.0.GA (exists since at least 3.3.0)", "comment": { "comments": [ { "id": "339646", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "This bug still exists in 3.5.0.GA", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-19T05:11:56.000+0000", "updated": "2015-01-19T05:11:56.000+0000" }, { "id": "399375", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The {{Ti.UI.ListView}} needs a {{bottom}} property to correctly range the bottom spacing. So this will work:\r\n{code:javascript}\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor : 'white',\r\n layout: 'vertical' // causes the bug\r\n});\r\n \r\nvar tableData = [];\r\nfor (var i = 1; i <= 20; i++) {\r\n\ttableData.push({title: 'table row' + i});\r\n}\r\n \r\n// The tableview will be cut at the bottom by 100 points\r\nvar table = Ti.UI.createTableView({ data: tableData, top: 100, bottom: 0});\r\nwin1.add(table);\r\n\r\nwin1.open();\r\n{code}\r\n", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-19T15:42:20.000+0000", "updated": "2016-10-19T15:42:20.000+0000" }, { "id": "415618", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:03:12.000+0000", "updated": "2017-03-24T18:03:12.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }