Android Question Detect touch

Sasuke Sama

Active Member
Licensed User
how can i see if a user is currently touching an object?
you see i have a seekbar
the seekbar shows when the user touches the screen and disapear after 3 seconds.
i want to detect if the user is using it or is touching it to keep it visable as long as the user is using it even after the 3 seconds
 

Erel

Administrator
Staff member
Licensed User
A simpler solution will be to hide the bar after it is inactive for a few seconds:
B4X:
Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
   SeekBarIndex = SeekBarIndex + 1 'global int variable
   Dim MyIndex As Int
   Sleep(3000)
   If MyIndex <> SeekBarIndex Then Return
   SeekBar1.SetVisibleAnimated(...)
End Sub
 
Top