{ "id": "94450", "key": "TIMOB-9880", "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-07-05T09:14:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "RTN", "api", "supportTeam" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "56895", "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": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2020-01-09T22:21:28.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem description\r\nWhen a custom background image is set for the title bar in Android, the image is not updated when the device is rotated. Opening a window with the right orientation, opens the right image inside the drawable-land or drawable-port directory, but that is not updated when orientation changes after the window has been open.\r\n\r\nh2. Steps to reproduce\r\n1. Create an app with the code below:\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n\tnavBarHidden: true,\r\n\ttabBarHidden: true,\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n\tnavBarHidden: false,\r\n\ttabBarHidden: true,\r\n\tbackgroundColor: 'white',\r\n\ttitle: null\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: 'Open'\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n\ttabGroup.activeTab.open(win2, {\r\n\t\tanimated: true\r\n\t});\r\n});\r\nwin1.add(btn);\r\n\r\nvar tab1 = Titanium.UI.createTab({ \r\n title:'Tab 1',\r\n window:win1\r\n});\r\ntabGroup.addTab(tab1); \r\ntabGroup.open();\r\n{code}\r\n\r\n2. Be sure to put 2 different images (one large for landscape, one narrow for portrait) for the title bar under:\r\n - platform/android/res/drawable-land/fullnavimage.png\r\n - platform/android/res/drawable-port/fullnavimage.png\r\n\r\n3. Set a custom theme by creating a platform/android/res/values/themes.xml file like this:\r\n\r\n{code}\r\n\r\n\t\r\n \r\n \r\n \r\n\r\n \r\n\r\n{code}\r\n\r\n4. Open the app with the device in portrait and click the 'Open' button\r\n\r\n5. Rotate the device in landscape: the customized title bar does not change, but the portrait one appeares stretched.\r\n\r\n6. Keeping the device in landscape, go back, click 'Open' again: the custom image now shows correctly, but going back to portrait gives the same problem as in #5\r\n\r\n\r\nh2. Expected result\r\nRotating the device shows the correct customized image\r\n", "attachment": [], "flagged": false, "summary": "Android: custom title bar is not updated on device orientation change", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK: 2.0.1\r\nPlatform OS: Android\r\nPlatform OS Version: 2.2", "comment": { "comments": [], "maxResults": 1, "total": 1, "startAt": 0 } } }