{ "id": "117135", "key": "TIMOB-14543", "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": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-06T18:20:28.000+0000", "created": "2013-07-12T11:55:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "iOS", "module_listview", "parity", "qe-manualtest", "usability" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-09-09T09:32:44.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": "*Problem*\r\nIn my attempt to get rid of separators for non-full ListViews I tried using Ti.UI.SIZE for the height. This works on Android as far as I can tell, but on iOS the ListView disappears.\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\nvar listView = Ti.UI.createListView({\r\n\ttop : 0,\r\n\theight : Ti.UI.SIZE //where is my listview??!?!?!?\r\n});\r\n\r\nvar section = Ti.UI.createListSection({\r\n\theaderTitle : 'ugly lines'\r\n});\r\nsection.setItems([{\r\n\tproperties : {\r\n\t\ttitle : 'Ugly lines on iOS'\r\n\t}\r\n}]);\r\n\r\nlistView.sections = [section];\r\n\r\nwin.add(listView);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Setting ListView height as Ti.UI.SIZE makes ListView disappear", "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": "SDK 3.1.1.GA, iOS 6.1 simulator", "closedSprints": [ { "id": 161, "state": "closed", "name": "2014 Sprint 16 SDK", "startDate": "2014-08-04T22:09:18.566Z", "endDate": "2014-08-15T00:00:00.000Z", "completeDate": "2014-08-18T21:17:18.487Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "261663", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA and 3.2 CI.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-12T19:19:08.000+0000", "updated": "2013-07-12T19:19:08.000+0000" }, { "id": "277938", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "Tested and confirmed on iOS 7.0.3 with Ti SDK 3.2.0.v20131010124846", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2013-11-04T12:45:32.000+0000", "updated": "2013-11-04T12:45:32.000+0000" }, { "id": "288342", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "Same for me, works great on android but on iOS it disapears. Trying to hide the rows/separators if they aren't needed based on dynamic data. No known workarounds.\r\n\r\nWith all the work with listviews recently, hopefully this takes priority and get it polished up! Any eta on this?", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2014-01-15T21:46:18.000+0000", "updated": "2014-01-15T21:51:40.000+0000" }, { "id": "310920", "author": { "name": "rkanmani@comerica.com", "key": "rkanmani@comerica.com", "displayName": "Kanmani Raja", "active": true, "timeZone": "America/New_York" }, "body": "Same for me, however the workaround to hide the empty rows is to set the footerTitle property to empty string. i.e., footerTitle: \"\"", "updateAuthor": { "name": "rkanmani@comerica.com", "key": "rkanmani@comerica.com", "displayName": "Kanmani Raja", "active": true, "timeZone": "America/New_York" }, "created": "2014-06-25T16:09:11.000+0000", "updated": "2014-06-25T16:09:35.000+0000" }, { "id": "311792", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Still an issue in 3.3.0.RC - Really frustrating I can't make a ListView size to its (non-scrollable) contents.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-07-01T13:54:23.000+0000", "updated": "2014-07-01T13:54:23.000+0000" }, { "id": "312678", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can someone provide a use case for this? We will attempt to find a solution.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-07T21:17:34.000+0000", "updated": "2014-07-07T21:17:34.000+0000" }, { "id": "312795", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~ingo] You mean a *why*? Some examples:\r\n\r\n* Using a non-scrollable ListView in a vertical layout\r\n* Using a ListView in a Popover\r\n\r\nMy main use case is the second one. I have a settings popover with a navigation window and a list view in the root window. A click on a row then opens a child window with another list view. The popover should take the size of the list, which is set to non-scrollable. But then it disappears :)", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-07-08T07:15:25.000+0000", "updated": "2014-07-08T07:15:25.000+0000" }, { "id": "312799", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "For me it is mostly Fokke's #1. So I can reuse templates through out my app and to be able to put a ListView in a ScrollView. For example:\r\n\r\nI have a Video screen with a WebView playing a YouTube video. An Ad via a Native Module, 3 comments and 3 related video's. Because of the Native Module (not possible) and WebView (missing EventListeners) I can not use the ListView for the whole screen. So I use a ScrollView and 2 ListViews for the 3 comments and 3 related video's. That way I can still reuse my templates for related video's and comments", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2014-07-08T08:25:01.000+0000", "updated": "2014-07-08T08:25:01.000+0000" }, { "id": "316907", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Case\r\n{code}\r\n\r\nvar hasHeader=false\r\nvar hasFooter=false\r\n\r\nvar container = Ti.UI.createView({backgroundColor:'white',top:0,height:40});\r\nvar b1 = Ti.UI.createButton({title:'Header',top:0,left:0});\r\nvar b2 = Ti.UI.createButton({title:'Footer',top:0,right:0});\r\nvar b3 = Ti.UI.createButton({title:'Style',top:0})\r\ncontainer.add(b1);\r\ncontainer.add(b2);\r\ncontainer.add(b3);\r\n\r\n\r\nvar dummyTexts = [\r\n 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\r\n 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',\r\n 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum'\r\n]\r\n\r\nvar tCount = 0;\r\n\r\nvar plain = true; \r\nvar win = Ti.UI.createWindow({backgroundColor:'blue',orientationModes:[1,2,3,4],fullscreen:true});\r\nvar listView = null;\r\n\r\nfunction doAction(e)\r\n{\r\n if (e.bindId == 'actionbtn') {\r\n var sInd = e.sectionIndex;\r\n var iInd = e.itemIndex;\r\n if (sInd == 0) {\r\n if (iInd == 0) {\r\n var s = Ti.UI.createListSection({headerTitle:'A New Section'});\r\n var items = [{info:{text:dummyTexts[tCount]}},{info:{text:'Delete Section'}}]\r\n tCount = tCount + 1;\r\n tCount = tCount % 3;\r\n s.setItems(items);\r\n listView.appendSection(s);\r\n } else if (iInd == 1) {\r\n var s = listView.sections[0];\r\n var item = [{info:{text:'Delete Row'}}]\r\n s.appendItems(item);\r\n } else {\r\n var s = listView.sections[0];\r\n s.deleteItemsAt(iInd,1);\r\n }\r\n } else {\r\n listView.deleteSectionAt(sInd);\r\n }\r\n }\r\n}\r\n\r\n\r\nfunction genDefaultSection()\r\n{\r\n var section = Ti.UI.createListSection({headerTitle:'Section Title'});\r\n var items = [\r\n {info:{text:'Append Section'}},\r\n {info:{text:'Append Row'}}\r\n ]\r\n section.setItems(items);\r\n return section;\r\n}\r\n\r\nvar myTemplate = {\r\n properties:{height:Ti.UI.SIZE},\r\n childTemplates: [\r\n { type: 'Ti.UI.Label',\r\n bindId: 'info',\r\n properties: {color:'black',left:'10dp', top:'5dp', width:'80%'}\r\n },\r\n { type: 'Ti.UI.Button',\r\n bindId: 'actionbtn',\r\n properties: {color: 'blue',right: '0dp',title:'GO'}\r\n }\r\n ],\r\n events: {click: doAction}\r\n};\r\n\r\nfunction genListView(style) \r\n{\r\n hasHeader=false\r\n hasFooter=false\r\n b1.color = 'red';\r\n b2.color = 'red';\r\n\r\n var listView = Ti.UI.createListView({templates: { 'template': myTemplate },defaultItemTemplate: 'template',left:'10dp',right:'10dp',top:40,style:style,height:Ti.UI.SIZE});\r\n listView.sections = [genDefaultSection()];\r\n return listView;\r\n}\r\n\r\n\r\nb1.addEventListener('click',function(e){\r\n if(hasHeader == true) {\r\n listView.headerView = null;\r\n b1.color = 'red';\r\n } else {\r\n var l = Ti.UI.createLabel({text:'I am header'});\r\n listView.headerView = l;\r\n b1.color = 'green';\r\n }\r\n hasHeader = !hasHeader;\r\n})\r\n\r\nb2.addEventListener('click',function(e){\r\n if(hasFooter == true) {\r\n listView.footerTitle = null;\r\n b2.color = 'red';\r\n } else {\r\n listView.footerTitle = 'I am a footer title';\r\n b2.color = 'green';\r\n }\r\n hasFooter = !hasFooter;\r\n})\r\n\r\nb3.addEventListener('click',function(e){\r\n win.remove(listView);\r\n listView = null;\r\n\r\n if (plain == true) {\r\n listView = genListView(1);\r\n } else {\r\n listView = genListView(0);\r\n }\r\n plain = !plain;\r\n win.add(listView);\r\n});\r\n\r\nwin.add(container);\r\nlistView = genListView(0);\r\nwin.add(listView);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-08-04T19:50:21.000+0000", "updated": "2014-08-04T22:23:39.000+0000" }, { "id": "316908", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5947", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-08-04T19:54:49.000+0000", "updated": "2014-08-04T19:54:49.000+0000" }, { "id": "320022", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mac osx 1-.9.4 Maverics\r\nAppcelerator Studio, build: 3.4.0.201408201526\r\nTitanium SDK, build: 3.4.0.v20140821144114\r\nNode.JS Version: v0.10.28\r\nNPM Path: /usr/local/bin/npm\r\nNPM Version: 1.4.23\r\nacs@1.0.16\r\nalloy@1.5.0-dev (git://github.com/appcelerator/alloy.git#b2e8f580d023e45c63072df924666e58193a8981)\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium@3.4.0-dev (git://github.com/appcelerator/titanium.git#9079326639c7f610dafee33dd16742de7d92d795)\r\ntitanium-code-processor@1.1.1\r\nXcode6\r\nDevice: iPhone 5c iOS 7.1\r\n\r\nClosing as fixed.", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-22T23:05:12.000+0000", "updated": "2014-08-22T23:05:12.000+0000" }, { "id": "322500", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-09-09T09:32:44.000+0000", "updated": "2014-09-09T09:32:44.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }