{ "id": "86886", "key": "TIMOB-14227", "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": null, "resolutiondate": null, "created": "2012-02-23T10:39:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "reprod" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "56878", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172171", "key": "TIMOB-26354", "fields": { "summary": "Android: Refactor TabGroup and introduce new style", "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": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": null, "updated": "2018-12-12T15:31:25.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Problem*\r\nLocking android window orientation should be straight forward as listed in the wiki, however there is strange buggy behaviour when using a tab group. The following test uses the default 2 tab app that every new mobile project creates, I've altered it so that tapping on the label on window 1 opens a brand new window on the same tab.\r\n\r\nAll the windows have been set to heavyweight and have their orientation set outside of the object creation to Ti.UI.PORTRAIT.\r\n\r\nWhat is expected is that the windows are locked from the start, however what happens is that the device orientation changes cause all the UI to change, until you open a new window on the first tab, then and only then are all the window orientation modes set.\r\n\r\n*Test case*\r\n{code:javascript}\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//\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\tfullscreen : false\r\n});\r\n\r\nwin1.orientationModes = [Ti.UI.PORTRAIT];\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\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor : '#999',\r\n\ttext : 'Tap to open new windoe',\r\n\tfont : {\r\n\t\tfontSize : 20,\r\n\t\tfontFamily : 'Helvetica Neue'\r\n\t},\r\n\ttextAlign : 'center',\r\n\twidth : 'auto'\r\n});\r\n\r\nlabel1.addEventListener('click', function(e) {\r\n\tvar win3 = Titanium.UI.createWindow({\r\n\t\ttitle : 'Win3',\r\n\t\tbackgroundColor : '#fff',\r\n\t\tfullscreen : false\r\n\t});\r\n\twin3.orientationModes = [Ti.UI.PORTRAIT];\r\n\ttabGroup.activeTab.open(win3);\r\n});\r\nwin1.add(label1);\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 : '#fff',\r\n\tfullscreen : false\r\n});\r\nwin1.orientationModes = [Ti.UI.PORTRAIT];\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\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor : '#999',\r\n\ttext : 'I am Window 2',\r\n\tfont : {\r\n\t\tfontSize : 20,\r\n\t\tfontFamily : 'Helvetica Neue'\r\n\t},\r\n\ttextAlign : 'center',\r\n\twidth : 'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\n// open tab group\r\ntabGroup.open();\r\n\r\n{code}\r\n\r\n\r\nh2. Discussions", "attachment": [], "flagged": false, "summary": "Android: Orientation mode not taken into account with TabGroup unless new window is opened", "creator": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "environment": "* Ti SDK 3.1 GA, 3.2 CI\r\n* Android 2.2, 2.3.5, 2.3.6\r\n* OS X 10.8\r\n* Ti Studio 3.1.0.201304151600", "comment": { "comments": [ { "id": "184075", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Please state the specific devices tested, or the emulator if you have tested that.\r\nPlease state the runtime used.\r\nThe test case can be minimized further. Personally, I'd take the comments out, and any superfluous objects.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-23T11:14:19.000+0000", "updated": "2012-02-23T11:14:19.000+0000" }, { "id": "184083", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "This is fixed in 1.9 CI, you can get it on http://builds.appcelerator.com.s3.amazonaws.com/index.html in the master branch.\r\n\r\nBest,\r\n\r\nMauro", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-02-23T12:04:41.000+0000", "updated": "2012-02-23T12:04:41.000+0000" }, { "id": "184088", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "That master branch only has 2.0.x releases, I can't find the 1.9 CI build anywhere - so i downloaded the latest build of the 2.0.x branch to test it, and this bug still exists in it. If you have a build you know has the fix in, could you point out a URL for it please, I can test it against my app. ", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-23T12:29:48.000+0000", "updated": "2012-02-23T12:29:48.000+0000" }, { "id": "184090", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Ketan,\r\nif that's the case, please provide info about how to reproduce this, so far I'm unable to reproduce this issue with your testcase.\r\n\r\nThanks, \r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-02-23T12:32:29.000+0000", "updated": "2012-02-23T12:32:29.000+0000" }, { "id": "184092", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "Hi Mauro,\r\n\r\nBest way to reproduce this is to load the app above onto a device and launch it.\r\n\r\nThen don't tap anything, but rotate the device so the orientation changes, the whole UI will move according to the device orientation.\r\n\r\nPlace the device back into Portrait orientation. now tap the label in the middle of the screen, push the device back button and now if you change the device orientation, the UI is fixed in PORTRAIT.\r\n\r\nThe desired, expected behaviour is that the first window is fixed without having to launch a second window.\r\n\r\nI hope that helps reproduce the bug for you.\r\n\r\nCheers,\r\nKet ", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-23T12:39:36.000+0000", "updated": "2012-02-23T12:41:23.000+0000" }, { "id": "184101", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "I tested using v8 on an HTC Wildfire S & Orange San Francisco (Blade) Devices. I have the test app above on a device and can record a video if it will make things clearer.\r\n\r\nTa,\r\n\r\nKet", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-23T13:43:25.000+0000", "updated": "2012-02-23T13:43:25.000+0000" }, { "id": "257785", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on Samsung Galaxy S2 Android 2.3.6 with Ti SDK 3.1 GA and 3.2 CI.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-13T22:42:08.000+0000", "updated": "2013-06-13T22:42:08.000+0000" }, { "id": "424310", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with the following environment;\r\nPixel (7.1)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1 GA\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.2\r\nTi CLI 5.0.14\r\nAlloy 1.9.11\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-18T18:25:58.000+0000", "updated": "2017-07-18T18:25:58.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }