Back Button exits app

anaylor01

Well-Known Member
Licensed User
Longtime User
I have 2 layouts and I want to go back to the other layout when the back button is pressed. I have tried the following. But it exits my app.
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If Keycode = KeyCodes.KEYCODE_BACK Then

removeviews
Activity.LoadLayout("categories")

End Sub
 
Top