Sub Orientation_OrientationChanged (Azimuth As Float, Pitch As Float, Roll As Float)
'Log("Orientation > "&GetOrientation)
If (GetOrientation = 0) Then
If (orientation = 0) Then
' ignore
Else if (orientation = 1) Then
orientation = 0
Log("Portrait")
Activity.RemoveAllViews
LogColor(SessionID.Get(Session),Colors.Blue)
Activity.LoadLayout(SessionID.Get(Session))
End If
Else If (GetOrientation = 1) Then
If (orientation = 0) Then
orientation = 1
Log("LandScape")
Activity.RemoveAllViews
LogColor(SessionID.Get(Session),Colors.Blue)
Activity.LoadLayout(SessionID.Get(Session))
Else if (orientation = 1) Then
'ignore
End If
End If
End Sub