#SupportedOrientations: sensorLandscape
Private magnetic As PhoneSensors
Sub Activity_Create(FirstTime As Boolean)
'Activity.LoadLayout("frmMain")
ime.Initialize("ime")
root = xui.CreatePanel("")
Dim Content As Rect = ime.GetContentRect
Activity.Color = Colors.Black
Activity.AddView(root, Content.Left, Content.Top, Content.Width, Content.Height)
ime.UpdatePercentageReference(root.Width, root.Height)
root.LoadLayout("frmMain")
magnetic.Initialize(magnetic.TYPE_MAGNETIC_FIELD)
magnetic.StartListening("Magnetic")
End Sub
Private Sub magnetic_SensorChanged (Values() As Float)
Dim Content As Rect = ime.GetContentRect
root.SetLayoutAnimated(0, Content.Left, Content.Top, Content.Width, Content.Height)
End Sub