Detecting back button

bluedude

Well-Known Member
Licensed User
Longtime User
Is there a way to detect the back button during for example a ProgressDialog?
 

alfcen

Well-Known Member
Licensed User
Longtime User
Perhaps something like this:
B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean
   If KeyCode = 4 Then  ' the Back key
       ProgressDialogHide
      Return True 'returns to the Activity instead of closing it.
   End If
End Sub
Note, that the Progress Dialog would close upon pressing the back key.
 
Upvote 0
Top