{ "id": "172454", "key": "TIMOB-26460", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-10-25T14:06:28.000+0000", "created": "2018-10-18T01:23:25.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "orientation", "toolbar" ], "versions": [], "issuelinks": [ { "id": "56918", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171154", "key": "TIMOB-25810", "fields": { "summary": "Android: ActionBar height won't resize on screen rotation", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-25T18:02:53.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": "*Summary:*\r\nAndroid Toolbars (and ActionBars) are supposed to use a height of {{56dp}} for portrait orientation and {{48dp}} for landscape. If a Toolbar's \"height\" is set to {{Ti.UI.SIZE}} (the default), then the height and its font size should automatically change when the orientation changes. It currently does *not*.\r\n\r\n*Steps to reproduce:*\r\n# Position an Android device in portrait.\r\n# Build and run the below code on that Android device.\r\n# Note the height of the top toolbar.\r\n# Rotate the device to landscape.\r\n# Notice that toolbar height does not shrink. _(This is the bug.)_\r\n# Keep holding the device at landscape and back out of the app.\r\n# Launch the app in landscape form.\r\n# Notice that the toolbar height is smaller upon launch.\r\n# Rotate the device to portrait.\r\n# Notice that the toolbar height has not increased. _(This is the bug.)_\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({\r\n\ttheme: \"Theme.AppCompat.NoTitleBar\",\r\n});\r\nvar toolbar = Ti.UI.createToolbar({\r\n\ttitle: \"My Toolbar\",\r\n\ttop: 0,\r\n\twidth: Ti.UI.FILL,\r\n\theight: Ti.UI.SIZE,\r\n});\r\nwindow.activity.supportToolbar = toolbar;\r\nwindow.add(toolbar);\r\nwindow.open();\r\n{code}\r\n\r\n*Cause:*\r\nThe height is not changing because Titanium override the activity's \"configChanges\" for orientation in the \"AndroidManifest.xml\". This is needed to prevent the UI from being torn down upon orientation change. Google designed it to reload UI from XML, but since Titanium's UI is generated dynamically via code, this is not an option. We have to resize the height ourselves.\r\n", "attachment": [], "flagged": false, "summary": "Android: Toolbar height set to Ti.UI.SIZE won't resize when changing orientation", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1084, "state": "closed", "name": "2018 Sprint 21", "startDate": "2018-10-07T23:32:40.560Z", "endDate": "2018-10-21T23:32:00.000Z", "completeDate": "2018-10-21T23:19:05.460Z", "originBoardId": 114 }, { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "442735", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10383", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-18T03:31:24.000+0000", "updated": "2018-10-18T03:31:24.000+0000" }, { "id": "442944", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "*FR Passed*\r\n\r\nWaiting on Jenkins to merge", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2018-10-25T14:06:22.000+0000", "updated": "2018-10-25T14:06:22.000+0000" }, { "id": "442955", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on sdk 7.5.0.v20181025085349. Toolbar height resized on orientation change. Closing.\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.12.0\r\n npm Version = 6.4.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nStudio\t\t\t =5.1.2.201810080801\r\nTitanium SDK\r\n SDK Version = 7.5.0.v20181025085349\r\nDevice = Samsung s5 Android 6,pixel android 9 \r\nEmulator\t\t\t\t= Samsung galaxy s6 android 6\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-10-25T18:02:30.000+0000", "updated": "2018-10-25T18:02:30.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }