{ "id": "118903", "key": "TIMOB-14935", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-08-26T22:09:36.000+0000", "created": "2013-08-22T10:55:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "holo_theme", "orientationChange", "triage" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "31323", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "100905", "key": "TIMOB-10863", "fields": { "summary": "Android: Application restarts when orientation changes and targetSdkVersion is 13 or higher", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-28T22:52:42.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": "Application restarts/crashes when we change orientation(either `portrait` to `landscape` or `landscape` to `portrait`) when applied holo theme to the modal windows.\r\nHere is the test case:\r\n\r\n1. copy the code in `app.js`:\r\n{code}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor : '#cecece',\r\n title : 'added by click from label1',\r\n layout : 'vertical'\r\n}),\r\nmsg = 'The appointment that you have selected differs from the service date and requires buyer approval. Would you still like to set this appointment?';\r\n\r\nvar button = Ti.UI.createButton({\r\n title: 'Click to Open modal'\r\n});\r\nbutton.addEventListener('click', function() {\r\n var wm = Ti.UI.createWindow({\r\n modal : true,\r\n /*transition : true,*/\r\n navBarHidden : true,\r\n tabBarHidden : true,\r\n backgroundColor : 'red',\r\n title : 'Modal window',\r\n layout : 'vertical'\r\n });\r\n wm.open();\r\n var b = Ti.UI.createButton({\r\n title:'Click to open alert'\r\n });\r\n wm.add(b);\r\n b.addEventListener('click',function(){\r\n var d = Titanium.UI.createAlertDialog({\r\n title : 'Pending Appointment',\r\n message : msg,\r\n buttonNames : ['Yes', 'No'],\r\n cancel : 1\r\n });\r\n d.show();\r\n });\r\n});\r\nw.add(button);\r\n\r\nvar button2 = Ti.UI.createButton({\r\n title: 'Click to Open regular window'\r\n});\r\nbutton2.addEventListener('click', function() {\r\n var wm = Ti.UI.createWindow({\r\n /*modal : true,*/\r\n transition : true,\r\n navBarHidden : true,\r\n tabBarHidden : true,\r\n backgroundColor : 'blue',\r\n title : 'NOT Modal window',\r\n layout : 'vertical'\r\n });\r\n wm.open();\r\n var b = Ti.UI.createButton({\r\n title:'Click to open alert'\r\n });\r\n wm.add(b);\r\n b.addEventListener('click',function(){\r\n var d = Titanium.UI.createAlertDialog({\r\n title : 'Pending Appointment',\r\n message : msg,\r\n buttonNames : ['Yes', 'No'],\r\n cancel : 1\r\n });\r\n d.show();\r\n });\r\n});\r\nw.add(button2);\r\n\r\nw.open();\r\n{code}\r\n\r\n2. Modify the tiapp.xml for \r\n{code}\r\n\r\n\r\n 14\r\n\t\r\n\t\r\n \r\n \t\r\n \r\n\t\r\n\r\n{code}\r\n\r\n3. Tested with placing `themes.xml` under `platform/android/res/values` and found the same issue.\r\nthemes.xml\r\n{code}\r\n\r\n\r\n \r\n\r\n{code}\r\n\r\nNote : In `app.js`, two different windows showing two different behaviors in 'orientationChange'. Normal window works fine with holo theme.\r\n", "attachment": [], "flagged": false, "summary": "Android: Application restarts on 'orientationChange' when applied holo theme on Modal windows", "creator": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.1.1, Android 4.0.4, 4.1.2", "comment": { "comments": [ { "id": "267599", "author": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "body": "if you add orientationModes to the creation of the windows, then normal windows also crash.", "updateAuthor": { "name": "mobile_developer@onforce.com", "key": "mobile_developer@onforce.com", "displayName": "Guto Dasilva", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-22T13:13:28.000+0000", "updated": "2013-08-22T13:13:28.000+0000" }, { "id": "268228", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of TIMOB-10863.\r\nPlease remove {code}android:configChanges=\"keyboardHidden|orientation\"{code} from tiapp.xml and then the app will work fine. Because for API 13+, by default, Titanium will set {code}android:configChanges=\"keyboardHidden|orientation|screenSize\"{code} in the tiapp.xml to avoid restarting the app when orientation changes. But in the above test case, this setting is overwritten and that's why the app restarts.\r\nResolve the ticket as Invalid.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-26T22:02:03.000+0000", "updated": "2013-08-26T22:10:11.000+0000" }, { "id": "416081", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-28T22:52:42.000+0000", "updated": "2017-03-28T22:52:42.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }