What button are you speaking of ?
You speak about a reset button and then about a return button.
If you are speaking about the Back button you can trap it with the code below :
B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
Dim Answ As Int
If KeyCode = KeyCodes.KEYCODE_BACK Then
Answ = Msgbox2("Do you want to quit the program ?", _
"A T T E N T I O N", "Yes", "", "No", Null)
If Answ = DialogResponse.NEGATIVE Then
Return True
End If
End If
Return False
End Sub