{ "id": "92436", "key": "TIMOB-11707", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14621", "description": "2012 Sprint 23 API", "name": "2012 Sprint 23 API", "archived": true, "released": true, "releaseDate": "2012-11-19" }, { "id": "14623", "description": "2012 Sprint 23 JS", "name": "2012 Sprint 23", "archived": true, "released": true, "releaseDate": "2012-11-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-11-13T19:47:26.000+0000", "created": "2012-05-26T12:00:38.000+0000", "priority": null, "labels": [ "ios", "iphone", "qe-port", "scrollableView", "sdk2.0.1GA2" ], "versions": [], "issuelinks": [ { "id": "21931", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "98742", "key": "TIMOB-10330", "fields": { "summary": "iOS: ScrollView: 'layout' to 'Horizontal' content is being cut-off", "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": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-01-18T02:39:35.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": "Setting the height property in scrollableView to Ti.UI.SIZE hides the view (probably sets height to 0).\r\n\r\nThe expected effect would be to have the scrollableView height adjust to the height of its contents or at least the default height (fit on screen).\r\nThe only way to get the scrollable view to display larger than the screen is to explicitly set its height with an integer value. This is not always possible or desirable since the content height might be unknown and computing it \"by hand\" with toImage() is costly.\r\nThe code example below has a variety of height values to demonstrate the different scenarios (uncomment as needed):\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n title:'ScrollableView'\r\n});\r\n \r\nvar scrollView = Ti.UI.createScrollView({\r\n top:0,\r\n left:0,\r\n backgroundColor:'#f1f1f1',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL,\r\n contentWidth:'auto',\r\n contentHeight:'auto',\r\n showVerticalScrollIndicator: true,\r\n showHorizontalScrollIndicator: false,\r\n layout:'vertical'\r\n});\r\n \r\nvar lab = Ti.UI.createLabel({\r\n color:'#2a2a2a',\r\n height:44,\r\n width:Ti.UI.SIZE,\r\n top:12,\r\n left:12,\r\n right:12,\r\n text:'Not working as expected',\r\n textAlign:'left',\r\n font:{fontFamily:'HelveticaNeue',fontSize:16,fontWeight:'normal'}\r\n});\r\n \r\nvar views = [];\r\n \r\nvar v1 = Ti.UI.createView({\r\n top:0,\r\n width:'100%',\r\n height:300,\r\n backgroundColor:'red'\r\n});\r\n \r\nviews.push(v1);\r\n \r\nvar v2 = Ti.UI.createView({\r\n top:0,\r\n width:'100%',\r\n height:600,\r\n backgroundColor:'green'\r\n});\r\n \r\nvar lab2 = Ti.UI.createLabel({\r\n top:370,\r\n left:60,\r\n right:60,\r\n text:'Scroll me up to see how I get cut off'\r\n});\r\n \r\nv2.add(lab2);\r\nviews.push(v2);\r\n \r\nvar scrollableView = Ti.UI.createScrollableView({\r\n top:0,\r\n views:views,\r\n showPagingControl:false,\r\n // height:'auto' // This is probably the default because\r\n // it has no affect\r\n // height:Ti.UI.FILL // This is probably the default because\r\n // it has no affect\r\n // height:Ti.UI.SIZE // If you add this the hight sets to 0\r\n // height:700 // This works and will make the\r\n // scrollableView fit its contents, but\r\n // requires that the height of the contents\r\n // is known, which is not the case in this app\r\n});\r\n \r\nscrollView.add(lab);\r\nscrollView.add(scrollableView);\r\nscrollView.add(Ti.UI.createView({top:0,width:Ti.UI.FILL,height:20}));\r\nwin.add(scrollView);\r\nwin.open();\r\n{code}", "attachment": [ { "id": "32533", "filename": "iOSSim.jpg", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-11T20:28:27.000+0000", "size": 46451, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "scrollableView height property set to Ti.UI.SIZE causes view to not display at all", "creator": { "name": "hglattergotz", "key": "hglattergotz", "displayName": "Henning Glatter-Gotz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hglattergotz", "key": "hglattergotz", "displayName": "Henning Glatter-Gotz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OSX 10.6.8\r\nSDK 2.0.1GA2\r\niOS", "comment": { "comments": [ { "id": "198145", "author": { "name": "mix", "key": "mix", "displayName": "Daniele Mantovani", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any news? I've the same problem and could not continue the application without solving that.\r\nIf I use the postrender and scroll event, catch the current view height and assign to the scrollableview height, could be a solution?", "updateAuthor": { "name": "mix", "key": "mix", "displayName": "Daniele Mantovani", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T08:23:23.000+0000", "updated": "2012-06-12T08:23:23.000+0000" }, { "id": "223127", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 5.1 and 6 with TiSDK 2.1.2 GA, 2.1.3 GA and 3.0.0.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-11T18:43:59.000+0000", "updated": "2012-10-11T18:43:59.000+0000" }, { "id": "223153", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-11T20:20:14.000+0000", "updated": "2012-10-11T20:29:03.000+0000" }, { "id": "226728", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Not Fixed.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-11-08T18:20:42.000+0000", "updated": "2012-11-08T18:20:42.000+0000" }, { "id": "226752", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/3396", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-11-08T20:02:36.000+0000", "updated": "2012-11-08T20:02:36.000+0000" }, { "id": "234891", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with: \r\nSDK:3.1.0.v20130114171802\r\nStudio:3.0.1.201212181159\r\nDevice: iPhone3GS(v5.0.1)", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-18T02:39:35.000+0000", "updated": "2013-01-18T02:39:35.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }