{ "id": "91073", "key": "TIMOB-8928", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-05-01T07:50:57.000+0000", "created": "2012-04-30T10:38:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "regression" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-10T00:05:48.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem description\r\nChanging orientation, scrollView vertical scroll might not work, depending on height property\r\n\r\nh2. Steps to reproduce and sample code\r\n- Create a scrollView and add objects to it\r\n- Be sure the scrollView height it's lower than the screen height in portrait (so it's not scrolling in portrait mode) but higher than screen height in landscape (where it should scroll)\r\nResult: when turned to landscape, scrollView it's not scrolling.\r\n\r\nThis is reproducible only with latest 2.1 master SDK.\r\nSee attached code below. Please note that changing 'stmtView' view height to a fixed number (for example 450) then the issue it's not reproducible and scrollView scroll down as expected.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'white',\r\n\ttitle:'test'\r\n});\r\n\r\nwin.orientationModes=[\r\n\t\tTitanium.UI.PORTRAIT,\r\n \t\tTitanium.UI.LANDSCAPE_LEFT,\r\n \t\tTitanium.UI.LANDSCAPE_RIGHT\r\n \t];\r\n\r\n\r\n\tvar view = Ti.UI.createView({\r\n\t\theight:205,\r\n\t\tbackgroundColor:'green',\r\n\t\ttop:0\r\n\t});\r\n\r\n\twin.add(view);\r\n\r\n\t\r\n\t\r\n\tvar stmtScrollView = Ti.UI.createScrollView({\r\n\t\t\tcontentWidth : 'auto',\r\n\t\t\t// contentHeight : 'auto',\r\n\t\t\ttop : 0,\r\n\t\t\tshowVerticalScrollIndicator : true,\r\n\t\t\tshowHorizontalScrollIndicator : false//true\r\n\t\t});\r\n\tvar stmtView = Ti.UI.createView({\r\n\t\t\ttop : 0,\r\n\t\t\tbottom : 20,\r\n\t\t\theight : Ti.UI.SIZE, //450, // setting a fixed number, like 450, scrollView scroll fine in landscape\r\n\t\t\tbackgroundColor:'gray',\r\n\t\t\tleft : 0,\r\n\t\t\tright : 0,\r\n\t\t\t//width:'100%',\r\n\t\t\tlayout : 'vertical'\r\n\t\t});\r\n\tstmtView.top = view.height;\r\n\tvar subNavViewSectionTitleLabel = Titanium.UI.createLabel({\r\n\t\t\ttop : 20,\r\n\t\t\theight : 'auto',\r\n\t\t\tleft : '5%',\r\n\t\t\tright : '3.1%',\r\n\t\t\tcolor : '#363636',\r\n\t\t\ttext : 'Test scrollView scroll',\r\n\t\t\tfont : {\r\n\t\t\t\tfontfamily : 'Helvetica Neue',\r\n\t\t\t\tfontSize : 20,\r\n\t\t\t\tfontWeight : 'bold'\r\n\t\t\t}\r\n\t\t});\r\n\tvar callBtn = Ti.UI.createButton({\r\n\t\t\t\ttop : 50,\r\n\t\t\t\tleft : '5%',\r\n\t\t\t\theight : 260,\r\n\t\t\t\tright : '4.1%',\r\n\t\t\t\ttitle : 'Red button',\r\n\t\t\t\tvisible : true,\r\n\t\t\t\tbackgroundColor : 'red',\r\n\t\t\t\tborderRadius : 8,\r\n\t\t\t\tfont : {\r\n\t\t\t\t\tfontSize : 19,\r\n\t\t\t\t\tfontWeight : 'bold',\r\n\t\t\t\t\tfontFamily : 'Helvetica Neue'\r\n\t\t\t\t},\r\n\t\t\t\tcolor : '#FFFFFF'\r\n\t\t\t});\r\n\t\r\n\r\n\tstmtView.add(subNavViewSectionTitleLabel);\r\n\tstmtView.add(callBtn);\r\n\tstmtScrollView.add(stmtView)\r\n\twin.add(stmtScrollView);\r\n\t\r\n\twin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: scrollView might not scroll changing device orientation", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.1 master\r\nAndroid OS", "comment": { "comments": [ { "id": "193259", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can not reproduce with latest master on HTC Sensation (2.3.4).", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-01T02:59:34.000+0000", "updated": "2012-05-01T02:59:34.000+0000" }, { "id": "411154", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing this ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T00:05:48.000+0000", "updated": "2017-03-10T00:05:48.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }