Android Question Back button long click?

AFAIK no
 
Upvote 0
You can use a timer for that:
Code: Copy
Sub Process_Globals
   Private backTimer As Timer
End Sub

Sub Globals
End Sub

Sub Activity_Create(FirstTime As Boolean)
   If FirstTime Then
     backTimer.Initialize("backTimer", 1000)
   End If
End Sub

Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
   If KeyCode = KeyCodes.KEYCODE_BACK Then
     backTimer.Enabled = True
     Return True
   Else
     Return False
   End If
End Sub

Sub Activity_KeyUp (KeyCode As Int) As Boolean
   If KeyCode = KeyCodes.KEYCODE_BACK Then
     backTimer.Enabled = False
     Return True
   Else
     Return False
   End If
End Sub

Sub BackTimer_Tick
   Log("LongBack event")
   backTimer.Enabled = False
End Sub
 
Upvote 0
Back
Top