Sub Activity_Pause (UserClosed As Boolean)
If UserClosed=True Then
RemoveAllViews 'Remove all Layouts
End If
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
Select Msgbox2("You need to quit?","Warning","Yes","","No",Null)
Case DialogResponse.POSITIVE
Activity.Finish
Case Else
Return True
End Select
End If
End Sub
Sub RemoveAllViews
Dim I As Int
For I = Activity.NumberOfViews - 1 To 0 Step -1
Activity.RemoveViewAt(I)
Next
End Sub