{ "id": "172382", "key": "TIMOB-26427", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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:05:27.000+0000", "created": "2018-10-02T01:55:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "safearea", "window" ], "versions": [], "issuelinks": [ { "id": "56919", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "172455", "key": "TIMOB-26461", "fields": { "summary": "iOS: Add \"safeAreaPadding\" property to Ti.UI.Window", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "56901", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171980", "key": "TIMOB-26246", "fields": { "summary": "Android: Handle Android P insetting/display-cutout", "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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "56921", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172458", "key": "TIMOB-26464", "fields": { "summary": "Windows: Add Ti.UI.Window property \"safeAreaPadding\"", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-25T22:45:45.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\nOn Android, we'd like to add support for Window property \"extendSafeArea\" so that the window's root view can extend under the Android 9 notch or under an Android 4.4 translucent StatusBar/NavigationBar (see: [TIMOB-26246]). However, this feature is useless since these insets can be of various sizes and on any side of the screen. An app developer needs to know what region of the screen they can place content so that it won't be covered up by the device's insets.\r\n\r\n*Proposal:*\r\nAdd read-only property \"safeAreaPadding\" to {{Ti.UI.Window}}. This property will return a Titanium [ViewPadding|https://docs.appcelerator.com/platform/latest/#!/api/ViewPadding] dictionary providing the left, top, right, and bottom padding needed to show content safely within the window without overlap. If there are no insets or if \"extendSafeArea\" is set {{false}}, then this property is expected to return all zeros for the padding.\r\n\r\nThe idea is that the app developer will then be able to set up their own safe area view and use it as a container as shown below.\r\n{code:javascript}\r\nvar FLAG_TRANSLUCENT_NAVIGATION = 134217728;\r\nvar FLAG_TRANSLUCENT_STATUS = 67108864;\r\nvar window = Ti.UI.createWindow({\r\n\textendSafeArea: true,\r\n\ttheme: \"Theme.AppCompat.NoTitleBar\",\r\n\twindowFlags: FLAG_TRANSLUCENT_STATUS | FLAG_TRANSLUCENT_NAVIGATION,\r\n});\r\nvar safeAreaView = Ti.UI.createView({\r\n\tbackgroundColor: \"green\",\r\n\tborderWidth: \"4dp\",\r\n\tborderColor: \"blue\",\r\n});\r\nwindow.add(safeAreaView);\r\nwindow.addEventListener(\"postlayout\", function() {\r\n\t// Padding's left/top/right/bottom can be used as pin positions for the view.\r\n\tsafeAreaView.applyProperties(window.safeAreaPadding);\r\n});\r\nwindow.open();\r\n{code}\r\n\r\n*Note:*\r\nWe should do the same on iOS to handle the following:\r\n* iPhone X top notch and bottom home indicator.\r\n* Translucent status bar on all other iOS devices. (Safe area should be beneath status bar.)\r\n\r\n*Safe-Area Container Example:*\r\nTest code [^ExtendSafeAreaContainerTest.js] shows how to create a safe-area view container for other child views, guaranteed to always make child content tappable without overlap. The green rectangle with the blue border is the safe-area view within the root white window using an orange border.\r\n !ExtendSafeAreaContainerPortrait.jpeg|thumbnail! !ExtendSafeAreaContainerLandscapeLeft.jpeg|thumbnail! !ExtendSafeAreaContainerLandscapeRight.jpeg|thumbnail! \r\n\r\n*Safe-Area ScrollView Example:*\r\nTest code [^ExtendSafeAreaScrollViewTest.js] shows how to pad a ScrollView. It allows its contents to scroll beneath a translucent status bar and navigation bar, but pads the top and bottom so that the top-most view and bottom-most view can be scrolled within the safe-area, making them tappable.\r\n !ExtendSafeAreaScrollPortraitTop.jpeg|thumbnail! !ExtendSafeAreaScrollPortraitBottom.jpeg|thumbnail! !ExtendSafeAreaScrollLandscapeRightTop.jpeg|thumbnail! !ExtendSafeAreaScrollLandscapeLeftBottom.jpeg|thumbnail! !ExtendSafeAreaScrollLandscapeLeftTop.jpeg|thumbnail! \r\n\r\n*Safe-Area TabGroup Example:*\r\nTest code [^ExtendSafeAreaTabsTest.js] shows how to extend tabs to beneath the notches, translucent status bar, and translucent navigation bar. You would *not* normally use a translucent top status bar with an opaque top tab bar, but this is for testing purposes. Note that the top tab bar hovers over the content and each individual tab completely fills the window. The safe-area padding reported lies within the TabGroup container where content is normally displayed when \"extendSafeArea\" is set to {{false}}.\r\n !ExtendSafeAreaTab1Portrait.jpeg|thumbnail! !ExtendSafeAreaTab2Portrait.jpeg|thumbnail! !ExtendSafeAreaTabTransitionPortrait.jpeg|thumbnail! !ExtendSafeAreaTab1LandscapeRight.jpeg|thumbnail! !ExtendSafeAreaTab1LandscapeLeft.jpeg|thumbnail! \r\n\r\n*Safe-Area DrawerLayout Example:*\r\nTest code [^ExtendSafeAreaDrawerTest.js] shows that a {{Ti.UI.Toolbar}} with \"extendBackground\" to {{true}} will automatically handle the safe-area when docked to the top of the screen. The toolbar will extend into the unsafe area of the screen inset while leaving its text and button content within the safe-area. This test code uses a toolbar in the root view and in a drawer side panel.\r\n !ExtendSafeAreaDrawerMainPortrait.jpg|thumbnail! !ExtendSafeAreaDrawerMainLandscape.jpg|thumbnail! !ExtendSafeAreaDrawerPanelPortrait.jpg|thumbnail! !ExtendSafeAreaDrawerPanelLandscape.jpg|thumbnail! \r\n", "attachment": [ { "id": "65754", "filename": "ExtendSafeAreaContainerLandscapeLeft.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:02:44.000+0000", "size": 602568, "mimeType": "image/jpeg" }, { "id": "65753", "filename": "ExtendSafeAreaContainerLandscapeRight.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:02:43.000+0000", "size": 443116, "mimeType": "image/jpeg" }, { "id": "65752", "filename": "ExtendSafeAreaContainerPortrait.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:02:43.000+0000", "size": 462364, "mimeType": "image/jpeg" }, { "id": "65751", "filename": "ExtendSafeAreaContainerTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:57:43.000+0000", "size": 842, "mimeType": "application/x-javascript" }, { "id": "65740", "filename": "ExtendSafeAreaDrawerMainLandscape.jpg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:38:21.000+0000", "size": 426379, "mimeType": "image/jpeg" }, { "id": "65739", "filename": "ExtendSafeAreaDrawerMainPortrait.jpg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:38:21.000+0000", "size": 473671, "mimeType": "image/jpeg" }, { "id": "65742", "filename": "ExtendSafeAreaDrawerPanelLandscape.jpg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:38:21.000+0000", "size": 581942, "mimeType": "image/jpeg" }, { "id": "65741", "filename": "ExtendSafeAreaDrawerPanelPortrait.jpg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:38:21.000+0000", "size": 528083, "mimeType": "image/jpeg" }, { "id": "65738", "filename": "ExtendSafeAreaDrawerTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:34:44.000+0000", "size": 2981, "mimeType": "application/x-javascript" }, { "id": "65748", "filename": "ExtendSafeAreaScrollLandscapeLeftBottom.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:48:11.000+0000", "size": 380421, "mimeType": "image/jpeg" }, { "id": "65747", "filename": "ExtendSafeAreaScrollLandscapeLeftTop.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:48:11.000+0000", "size": 411288, "mimeType": "image/jpeg" }, { "id": "65746", "filename": "ExtendSafeAreaScrollLandscapeRightTop.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:48:11.000+0000", "size": 429002, "mimeType": "image/jpeg" }, { "id": "65750", "filename": "ExtendSafeAreaScrollPortraitBottom.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:50:40.000+0000", "size": 444875, "mimeType": "image/jpeg" }, { "id": "65749", "filename": "ExtendSafeAreaScrollPortraitTop.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:50:22.000+0000", "size": 418895, "mimeType": "image/jpeg" }, { "id": "65743", "filename": "ExtendSafeAreaScrollViewTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T22:48:06.000+0000", "size": 1801, "mimeType": "application/x-javascript" }, { "id": "65760", "filename": "ExtendSafeAreaTab1LandscapeLeft.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:39:10.000+0000", "size": 443817, "mimeType": "image/jpeg" }, { "id": "65759", "filename": "ExtendSafeAreaTab1LandscapeRight.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:39:10.000+0000", "size": 380636, "mimeType": "image/jpeg" }, { "id": "65756", "filename": "ExtendSafeAreaTab1Portrait.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:39:10.000+0000", "size": 496940, "mimeType": "image/jpeg" }, { "id": "65757", "filename": "ExtendSafeAreaTab2Portrait.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:39:10.000+0000", "size": 461524, "mimeType": "image/jpeg" }, { "id": "65755", "filename": "ExtendSafeAreaTabsTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:17:18.000+0000", "size": 1955, "mimeType": "application/x-javascript" }, { "id": "65758", "filename": "ExtendSafeAreaTabTransitionPortrait.jpeg", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T23:39:10.000+0000", "size": 443968, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: Add \"safeAreaPadding\" property to Ti.UI.Window", "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": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "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": "442739", "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:32:36.000+0000", "updated": "2018-10-18T03:32:36.000+0000" }, { "id": "442941", "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:05:20.000+0000", "updated": "2018-10-25T14:05:20.000+0000" }, { "id": "442968", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 7.5.0.v20181025085349. 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 = Samsung galaxy s6 android 6,nexus 4.4\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-10-25T22:45:38.000+0000", "updated": "2018-10-25T22:45:38.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }