{ "id": "89896", "key": "AC-2971", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-04-12T08:32:35.000+0000", "created": "2012-04-12T07:35:20.000+0000", "labels": [ "ios", "layout" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:47:58.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": [], "description": "The code below works as expected on 1.8.2 however on 2.0.1.v20120410131722 the body takes up the entire screen (it appears the auto height isn't working correctly).\r\n\r\n~~~\r\n\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n\r\n\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\n\r\nvar sView = Ti.UI.createScrollView({\r\n\t\tcontentWidth:'auto',\r\n \tcontentHeight:'auto',\r\n\t top:0,\r\n\t height:400,\r\n\t backgroundColor:'#eef4f6',\r\n\t \tshowVerticalScrollIndicator:true\r\n\t});\r\n\t\r\nvar innerView = Ti.UI.createView({\r\n\t//layout:'vertical', //THIS BREAK SCROLLING - NO IDEA WHY\r\n\ttop:0,\r\n\theight:'auto',\r\n\twidth:'100%'\r\n});\r\n\r\n\tvar sidePadding = '10';\r\n\tvar iView = Ti.UI.createView({\r\n\t\tlayout:'vertical',\r\n\t\ttop:0,\r\n\t\tleft:sidePadding+'dp',\r\n\t\tright:sidePadding+'dp'\r\n\t});\r\n\tvar top = Ti.UI.createView({\r\n\t\ttop:0,\r\n\t\theight:35,\r\n\t\twidth:'100%',\r\n\t\tbackgroundColor:'red'\r\n\t});\r\n\tvar body = Ti.UI.createView({\r\n\t\ttop:0,\r\n\t\tbackgroundColor:'red',\r\n\t\twidth:'100%',\r\n\t\theight:'auto',\r\n\t\tbackgroundColor:'yellow'\r\n\t});\r\n\t\r\n\tvar fontSize = 12;\r\n\tvar text = Ti.UI.createLabel({\r\n\t\ttop:'0',\r\n\t\tcolor:'black',\r\n\t\theight:'auto',\r\n \tfont:{fontSize:fontSize+'dp'},\r\n \ttextAlign:'left',\r\n \tleft:5,\r\n \tright:5,\r\n \ttext:\"Lorem Ipsmum Lorem IpsmumLorem IpsmumLorem Ipsmum Lorem Ipsmum Lorem IpsmumLorem IpsmumLorem Ipsmum\"\r\n })\r\n\tbody.add(text);\r\n\t\r\n\tvar bot = Ti.UI.createView({\r\n\t\ttop:0,\r\n\t\theight:17,\r\n\t\twidth:'100%',\r\n\t\tbackgroundColor:'blue'\r\n\t});\r\n\tiView.add(top);\r\n\tiView.add(body);\r\n\tiView.add(bot);\r\n\tinnerView.add(iView);\r\n\tsView.add(innerView);\r\n\twin1.add(sView);\r\n\twin1.open();\r\n~~~", "attachment": [], "flagged": false, "summary": "Auto height not working in 2.x (works in 1.8.2)", "creator": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS\r\nBuild: 2.0.1.v20120410131722", "comment": { "comments": [ { "id": "190702", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "Use Ti.UI.SIZE instead of 'auto'. This is a new feature & behavior in 2.x, and is expected.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2012-04-12T07:39:07.000+0000", "updated": "2012-04-12T07:39:07.000+0000" }, { "id": "190703", "author": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ah, that works. Thanks.\r\n", "updateAuthor": { "name": "tvfoodmaps", "key": "tvfoodmaps", "displayName": "Frank Apap", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-12T07:48:58.000+0000", "updated": "2012-04-12T07:48:58.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }