Private Sub Page1_Resize(Width As Int, Height As Int)
If gmap.IsInitialized Then gmap.SetLayoutAnimated(0, 1, 0, 0, Width, Height)
Dim r As Rect = Page1.SafeAreaInsets
If r.Bottom+r.Left+r.Right+r.Top <> 0 Then 'if iPhone X
If Height=768 Then 'in Portrait mode
btnSettings.Top=btnSettings.Top-10 'Move the buttons up to clear Home Indicator
btnDistress.Top=btnDistress.Top-10
End If
End If
End Sub