Back Button Default Behavior?

rclodfelter

Member
Licensed User
Longtime User
I'm having an issue with the back button. I thought the default behavior was to go back to the previous screen. What is happening is that I am getting taken completely out of my app.

Is there a default way to program this to go back to the previous screen?

TIA
 

rclodfelter

Member
Licensed User
Longtime User
I'm not explicitly closing anything.

I react to an event by going to a sub, do some work like process an edittext field, insert data into a database, and pop up a success msgbox. I press the device back button and I get taken out of the app.
 
Upvote 0

rclodfelter

Member
Licensed User
Longtime User
No I don't call Activity.Finish and I am not using StartActivity.. I go into Axctivity_create, create my db, call a sub which brings up my main menu screen.

Sub Activity_Create(FirstTime As Boolean)
Bmp.Initialize(File.DirAssets, "android48.png")

LoadLayoutToPanel("mainscreen")

'Create database
If FirstTime Then
SQL1.Initialize(File.DirInternal, "med.db", True)
CreateTables
End If

scvList.Initialize(0)
pnlList=scvList.Panel
pnlList.Color=LineColor

Activity.AddView(scvList, 5%x, 30%y, 90%x, 60%y)
Activity.LoadLayout("ScrollViewList")
NumberOfVisibleRows=scvList.Height/RowHeight

'List_Init ' Initialize my liust from the database
List_Select(0)

End Sub
 
Upvote 0

rclodfelter

Member
Licensed User
Longtime User
OK, that makes sense. I'll have to investigate Activities or figure out a way to store which layout i was previously in and return to it if the back button is pressed.
 
Upvote 0
Top