{ "id": "83636", "key": "TIMOB-6592", "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": "12090", "description": "", "name": "Sprint 2011-50", "archived": true, "released": true, "releaseDate": "2011-12-19" }, { "id": "12571", "description": "CI for 1_7_X", "name": "Release 1.7.6", "archived": true, "released": false }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" } ], "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": "2013-07-16T21:50:36.000+0000", "created": "2011-12-12T17:16:50.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_orientation", "parity", "qe-3.1.1", "qe-testadded" ], "versions": [ { "id": "12571", "description": "CI for 1_7_X", "name": "Release 1.7.6", "archived": true, "released": false } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:25:20.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": "h4. Issue\r\nWhen user change the tab and then rotate the device, the orientation change event listener is not getting fired. I have attached a sample code and steps to recreate this issue is as below\r\n\r\nh4. Steps to reproduce\r\n1. Switch to tab2\r\n2. tilt the device to landscape\r\n3. click on tab1 and rotate the phone to portrait. \r\nNow the gesture change event will not be fired.\r\n\r\n{code}\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// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle:'Tab 1',\r\n\tbackgroundColor:'#fff',\r\n\tnavBarHidden:false\r\n});\r\nvar win3 = Titanium.UI.createWindow({\r\n\ttitle:'Tab 3',\r\n\tbackgroundColor:'blue',\r\n\tnavBarHidden:false\r\n});\r\n\r\nwin3.orientationModes = [\r\n Titanium.UI.PORTRAIT,\r\n Titanium.UI.LANDSCAPE_LEFT,\r\n Titanium.UI.LANDSCAPE_RIGHT];\r\n\r\nvar bt = Ti.UI.createButton({\r\n\tbackgroundImage:'default_app_logo.png',\r\n\twidth:44,\r\n\theight:39,\r\n\ttop:0,\r\n\tright:'6.25%'\r\n});\r\n\r\nbt.addEventListener('click', function(e) {\r\n\ttab1.open(win3);\r\n});\r\n\r\nfunction createnewview(_currOrientation) {\r\n\tvar ds = [];\r\n\r\n\tif(_currOrientation === 'landscape') {\r\n\t\tvar r1 = Ti.UI.createTableViewRow({\r\n\t\t\theight:50,\r\n\t\t\tbackgroundColor:'green'\r\n\t\t});\r\n\t\tds.push(r1);\r\n\t} else {\r\n\t\tvar r = Ti.UI.createTableViewRow({\r\n\t\t\theight:50,\r\n\t\t\tbackgroundColor:'yellow'\r\n\t\t});\r\n\t\tds.push(r);\r\n\t}\r\n\r\n\treturn ds;\r\n}\r\n\r\nfunction getOrientation(o) {\r\n\tswitch (o) {\r\n\t\tcase Titanium.UI.PORTRAIT:\r\n\t\t\treturn 'portrait';\r\n\t\tcase Titanium.UI.UPSIDE_PORTRAIT:\r\n\t\t\treturn 'portrait';\r\n\t\tcase Titanium.UI.LANDSCAPE_LEFT:\r\n\t\t\treturn 'landscape';\r\n\t\tcase Titanium.UI.LANDSCAPE_RIGHT:\r\n\t\t\treturn 'landscape';\r\n\t}\r\n};\r\n\r\nvar datasource = createnewview(getOrientation(Titanium.Gesture.orientation));\r\nvar tv = Ti.UI.createTableView({\r\n\theight : 100,\r\n\tdata: datasource\r\n});\r\nwin1.add( bt);\r\n\r\nTi.Gesture.addEventListener('orientationchange', function(e) {\r\n\talert('changed')\r\n/*setTimeout(function(){\r\n\tvar _currOrientation = getOrientation(Titanium.Gesture.orientation);\r\n\ttv.data = createnewview(_currOrientation)\r\n\tif(_currOrientation === 'landscape') {\r\n\t\ttabGroup.animate({\r\n\t\t\tbottom:-60\r\n\t\t});\r\n\t\twin3.hideNavBar();\r\n\r\n\t} else {\r\n\t\ttabGroup.animate({\r\n\t\t\tbottom:0\r\n\t\t});\r\n\t\twin3.showNavBar();\r\n\t}\r\n},300);*/\r\n});\r\n\r\n\r\nvar tab1 = Titanium.UI.createTab({\r\n\ticon:'KS_nav_views.png',\r\n\ttitle:'Tab 1',\r\n\twindow:win1\r\n});\r\n\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({\r\n\ttitle:'Tab 2',\r\n\tbackgroundColor:'blue',\r\n\tnavBarHidden:false\r\n});\r\n\r\nvar tab2 = Titanium.UI.createTab({\r\n\ticon:'KS_nav_ui.png',\r\n\ttitle:'Tab 2',\r\n\twindow:win2\r\n});\r\n\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code}\r\n\r\nh4. Expected behavior\r\nIf TiSDK 1.8.01 is used the event is fired when we follow the steps above. We could not locate any existing JIRA log that has fixed the issue.", "attachment": [ { "id": "24584", "filename": "app2.js", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2011-12-12T17:16:50.000+0000", "size": 2359, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Android: Gesture change event not fired when switching tab", "creator": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "environment": "Titanium SDK version: 1.7.5 / 1.7.6\r\nPlatform OS: Android\r\nPlatform OS Version: 2.2\r\nDevice Details: android Emulator \r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio Build 1.0.6.201110251616", "comment": { "comments": [ { "id": "179146", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 1.9.0.v20120112104633\r\nRuntime: V8, Rhino\r\nTitanium Studio, build: 1.0.8.201201111843\r\nDevice: Droid 3 (2.3.4)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-12T17:28:09.000+0000", "updated": "2012-01-12T17:28:09.000+0000" }, { "id": "253071", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Issue is reproducible. This is not a regression.\r\nIssue occurs since 2.1.4.GA \r\n\r\nEnvironment used:\r\nDevice : Google Nexus 7, Android Version: 4.1\r\nSDK: 3.1.1.v20130517185716\r\nCLI version : 3.1.0\r\nOS : MAC OSX 10.7.5\r\nAppcelerator Studio, build: 3.1.2.201305181607\r\nXCode : 4.5.1", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-05-21T10:44:00.000+0000", "updated": "2013-05-21T10:44:00.000+0000" }, { "id": "262101", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on Galaxy Nexus and Nexus 7. Unable to reproduce. Gesture events fired as expected.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-16T21:50:22.000+0000", "updated": "2013-07-16T21:50:22.000+0000" }, { "id": "414573", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:25:20.000+0000", "updated": "2017-03-21T22:25:20.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }