A anaylor01 Well-Known Member Licensed User Longtime User May 29, 2011 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User May 29, 2011 #2 You should return true from this sub. Otherwise the OS handles the back key. Upvote 0
A anaylor01 Well-Known Member Licensed User Longtime User May 29, 2011 #3 Thanks. THat did the trick. Upvote 0