{ "id": "173487", "key": "AC-6220", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "10000", "description": "", "name": "Done" }, "resolutiondate": "2019-06-26T08:38:50.000+0000", "created": "2019-04-19T18:31:39.000+0000", "labels": [ "SplitWindow", "iOS" ], "versions": [], "issuelinks": [ { "id": "57501", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172752", "key": "TIMOB-26657", "fields": { "summary": "iOS: 'masterIsOverlayed' not working when app is in Split View Mode & Landscape", "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": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-06-26T08:38:50.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": [], "attachment": [ { "id": "66565", "filename": "step1.png", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2019-04-19T18:33:26.000+0000", "size": 58803, "mimeType": "image/png" }, { "id": "66564", "filename": "step2.png", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2019-04-19T18:33:21.000+0000", "size": 56399, "mimeType": "image/png" }, { "id": "66563", "filename": "step3.png", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2019-04-19T18:33:17.000+0000", "size": 52810, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: 'masterIsOverlayed' covering up Detail View LeftNavButtons", "creator": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "environment": "Ti 8.0.0.GA", "comment": { "comments": [ { "id": "447800", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~amwinsauto] \r\nAs per doc [here|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.SplitWindow-property-masterViewVisible]\r\n\"\r\nThe property masterIsOverlayed controls how the master is displayed in portrait mode. When masterIsOverlayed is set to true, the detailView occupies the full screen and and masterView is displayed overlayed on top to the left of the screen. When masterIsOverlayed is set to false, the available screen width is split between the masterView and detailView.\r\n\"\r\nis not it expected behavior? Or am I missing anything?", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-19T22:05:52.000+0000", "updated": "2019-04-19T22:05:52.000+0000" }, { "id": "447803", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I haven't tested this, but let me ask the question.\r\n\r\nIf you launch the app in portrait form, are all of the navigation buttons shown?\r\nIs this only an issue when launching landscape? (If so, then this suggests that the UI layout isn't being updated for the new orientation.)", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-20T00:43:51.000+0000", "updated": "2019-04-20T00:43:51.000+0000" }, { "id": "447843", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "OK, I dont think I explained my issue correctly. When rotating the device then I expected the Master Overlay to change behavior based on Landscape/Portrait. So that is probably more on me to handle by adding an \"orientationchange\" event listener.\r\n\r\nSpecifically, when in \"Split Window\" with another app. Meaning...your physical device may be in landscape....but if you are split 50%/50% with another app, then really my app should be operating as though it was Portrait.\r\n\r\nBut, when trying to app my event listener, I am getting height=undefined and width=undefined. I tried to get height & width from the SplitWindow, the NavigationWindow and from the Window and all 3 return undefined.\r\n\r\n\r\nCODE\r\n{code:javascript}\r\nTi.Gesture.addEventListener('orientationchange',function(e) {\r\n\tTi.API.info('orientation changed!');\r\n\tTi.API.info('Orientation: ' + e.orientation);\r\n\tTi.API.info('Portrait: ' + e.source.portrait);\r\n\tTi.API.info('Landscape: ' + e.source.landscape);\r\n\tTi.API.info('Detail Win- Height: ' + $.detailWindow.height + ', Width: ' + $.detailWindow.width);\r\n\tTi.API.info('Detail NAV Win- Height: ' + $.detailNavWindow.height + ', Width: ' + $.detailNavWindow.width);\r\n\tTi.API.info('SplitWindow NAV Win- Height: ' + $.splitWindow.height + ', Width: ' + $.splitWindow.width);\r\n\tif (e.source.portrait) {\r\n\t\t$.masterCollapseButton.visible = true;\r\n\t\t$.masterOpenButton.visible = true;\r\n\t} else {\r\n\t\tif ($.detailWindow.height >= $.detailWindow.width) {\r\n\t\t\t//act as Portrait\r\n\t\t\t$.masterCollapseButton.visible = true;\r\n\t\t\t$.masterOpenButton.visible = true;\r\n\t\t} else {\r\n\t\t\t//landscape\r\n\t\t\t$.masterCollapseButton.visible = false;\r\n\t\t\t$.masterOpenButton.visible = false;\r\n\t\t\tif (!$.splitWindow.masterViewVisible) { toggleMaster(); }\t//when rotating to landscape, if master is hidden toggle it to be visible\r\n\t\t}\r\n\t}\r\n});\r\n{code}\r\n\r\n\r\nCONSOLE\r\n[INFO] orientation changed!\r\n[INFO] Orientation: 2\r\n[INFO] Portrait: true\r\n[INFO] Landscape: false\r\n[INFO] Detail Win- Height: undefined, Width: undefined\r\n[INFO] Detail NAV Win- Height: undefined, Width: undefined\r\n[INFO] SplitWindow NAV Win- Height: undefined, Width: undefined\r\n", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2019-04-22T21:27:01.000+0000", "updated": "2019-04-22T21:27:01.000+0000" }, { "id": "448207", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "Any idea how I can get the height and width of the Window within a SplitWindow?\r\n", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2019-05-07T11:56:03.000+0000", "updated": "2019-05-07T11:56:03.000+0000" }, { "id": "448634", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~amwinsauto],\r\nThanks for your query. Check this [link|https://stackoverflow.com/questions/46395850/titanium-how-to-determine-the-screen-width-when-using-splitview]. Hope this helps.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-05-24T09:41:08.000+0000", "updated": "2019-05-24T09:41:08.000+0000" }, { "id": "448711", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "I first started with the 'orientationchange' eventListener but that only works if you change orientation. What about if you open the app and go into Split Over but never rotate? So then I proceeded to use the 'postlayout' eventListener which works on any layout change - including rotating your device. So I removed the 'orientationchange' - since there was overlap there. But then I was left with still the biggest issue:\r\nThere is no way to know/identify when the iPad is in SplitOver with another app.\r\n\r\nThats when I decided to take the device height/width into account to solve the problem. This works perfect - should anyone need it.\r\n\r\n\r\n\r\n{code:javascript}\r\nvar showMaster = true;\r\nAlloy.Globals.deviceSmallestMeasurement = (parseInt(Ti.Platform.displayCaps.platformWidth) < parseInt(Ti.Platform.displayCaps.platformHeight)) ? parseInt(Ti.Platform.displayCaps.platformWidth) : parseInt(Ti.Platform.displayCaps.platformHeight);\r\n\r\nfunction toggleMaster(){\r\n\t$.splitWindow.masterViewVisible = !showMaster;\r\n\tshowMaster = !showMaster;\r\n}\r\n\r\n$.splitWindow.addEventListener('postlayout',function(e) {\t\r\n\t\tif ($.splitWindow.toImage().width <= Alloy.Globals.deviceSmallestMeasurement) {\r\n\t\t\t//act as Portrait\r\n\t\t\t$.masterCollapseButton.visible = true;\r\n\t\t\t$.masterOpenButton.visible = true;\r\n\t\t} else {\r\n\t\t\t//landscape\r\n\t\t\t$.masterCollapseButton.visible = false;\r\n\t\t\t$.masterOpenButton.visible = false;\r\n\t\t\tif (!$.splitWindow.masterViewVisible) { toggleMaster(); }\t//when rotating to landscape, if master is hidden toggle it to be visible\r\n\t\t}\r\n});\r\n{code}", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2019-05-29T13:25:02.000+0000", "updated": "2019-05-29T13:25:02.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }