{"action":"opened","issue":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4599","repository_url":"https://api.github.com/repos/xamarin/Xamarin.Forms","labels_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4599/labels{/name}","comments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4599/comments","events_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4599/events","html_url":"https://github.com/xamarin/Xamarin.Forms/issues/4599","id":386353707,"node_id":"MDU6SXNzdWUzODYzNTM3MDc=","number":4599,"title":"[iOS] V3.0 Unexpected left margin inside the ListView control, after the control is moved outside of the screen boundaries and back (iPhone X devices in Portrait mode only)","user":{"login":"skolesni","id":1001545,"node_id":"MDQ6VXNlcjEwMDE1NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1001545?v=4","gravatar_id":"","url":"https://api.github.com/users/skolesni","html_url":"https://github.com/skolesni","followers_url":"https://api.github.com/users/skolesni/followers","following_url":"https://api.github.com/users/skolesni/following{/other_user}","gists_url":"https://api.github.com/users/skolesni/gists{/gist_id}","starred_url":"https://api.github.com/users/skolesni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skolesni/subscriptions","organizations_url":"https://api.github.com/users/skolesni/orgs","repos_url":"https://api.github.com/users/skolesni/repos","events_url":"https://api.github.com/users/skolesni/events{/privacy}","received_events_url":"https://api.github.com/users/skolesni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-30T21:18:53Z","updated_at":"2018-11-30T21:18:53Z","closed_at":null,"author_association":"NONE","body":"### Description\r\nThe Xamarin.Forms.ListView control on iOS introduces unexpected left margin after being shifted outside of the screen boundary and back using the TransformX function. This only happens on iPhone X devices in Landscape mode. \r\n\r\nIn this scenario, I create a slide in menu, which uses ListView control to display Menu Items. When the user taps on the \"Menu\" button (see screenshots in the sample solution below), the menu slides in from the left. When the user dismisses the menu, it slides out back to the left. Once the menu panel control is created, it stays hidden outside the boundaries of the view. The menu panel control is created dynamically, placed outside of the view and attached to the parent control, then its position is manipulated using TransformX with animation.\r\n\r\nHere is the sample solution which demonstrates the issue: https://github.com/skolesni/Issues.ListViewTranslate.Forms\r\n\r\nThis code has been working in a number of production apps since 2016. Since the introduction of the iPhone X devices (with the notch) the issue started to appear only on iPhone X devices. The code works fine on any pre-iPhone X devices, e.g. iPhone 8, iPhone 8 Plus, etc., on Android and UWP.\r\n\r\nI have tried different approaches to create a sliding effect of the menu, but never get satisfying results with the ListView in the scope of affected devices. If I use other controls, such as StackLayout of items, the solution works as expected.\r\n\r\nOnce the sample solution is downloaded, please have a look at the screenshots in the \"Screenshots\" folder.\r\n\r\n### Steps to Reproduce\r\n1. Download the solution from GitHub repo given above.\r\n2. Start the app on iOS X device or iOS X simulator in portrait (normal) mode.\r\n3. Tap the \"Menu\" button - note that the menu slides in from the left, and the remaining screen is dimmed.\r\n4. Observe that the \"Home\", \"Messages\", \"Settings\" and \"About\" menu items have a correct 16px margin on the left\r\n4. Tap on \"Messages\" item, this will highlight the item. This proves that the ListView is working as expected\r\n5. Tap anywhere outside the menu panel to close it\r\n6. Repeat step 2 again and observe that the menu appears as expected\r\n7. Close the menu\r\n8. Rotate device Counter-Clockwise to turn the device to the Landscape mode\r\n9. Tap the \"Menu\" button - note that the menu slides in from the left\r\n10. Observe that this time the \"Home\", \"Messages\", \"Settings\" and \"About\" menu items are shifted significantly to the right (see screenshot file \"Simulator Screen Shot - iPhone XR - Landscape.png\")\r\n11. Close the menu item\r\n12. Rotate device Clockwise to turn the device to the Portrait mode again\r\n13. Observe that the menu appears as expected\r\n\r\n### Expected Behavior\r\nThere is no unexpected margin on the left in the menu panel\r\n\r\n### Actual Behavior\r\nThere is an unexpected margin of approximately 75px on the left in the menu panel\r\n\r\n### Basic Information\r\nFor a brief description of the solution, please refer to the \"readme.md\" file in the https://github.com/skolesni/Issues.ListViewTranslate.Forms repository\r\n\r\n- Version with issue:\r\n- Last known good version: Pre iPhone X devices work fine\r\n- IDE: Visual Studio 2017 Pro\r\n- Platform Target Frameworks:\r\n  - iOS:  12.1\r\n  - Android: N/A\r\n  - UWP:  N/A \r\n- Android Support Library Version: N/A\r\n- Nuget Packages: Xamarin.Forms 3.4.0\r\n- Affected Devices: iPhone X, iPhone XS, iPhone XS Max, iPhone XR\r\n\r\n### Screenshots\r\nScreenshots are provided in the \"Screenshots\" folder of the https://github.com/skolesni/Issues.ListViewTranslate.Forms repository\r\n"}}
{"actor":{"display_login":"skolesni"}}