Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
If MapPanel.Visible=True Then
Main.BringToFront
MapPanel.SendToBack
MapPanel.Visible=False
MapPanel.RemoveAllViews
Return True
End If
If Main.Visible=True Then
HomeScreen
Return True
End If
End If
Return False
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
If MapPanel.Visible=True Then
Main.BringToFront
MapPanel.SendToBack
MapPanel.Visible=False
MapPanel.RemoveAllViews
Return True
End If
If Main.Visible=True Then
HomeScreen
Return True
End If
End If
Return False ' You are missing this return value if the IF block above is not entered
End Sub
Thank you !!!
that worked.
Please explain:
"code tags"
[code]Dim Button1 As Button[/code]
Dim Button1 As Button