1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question Detect touch

Discussion in 'Android Questions' started by Sasuke Sama, Apr 8, 2019.

  1. Sasuke Sama

    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
  2. Erel

    Erel Administrator Staff Member Licensed User

    A simpler solution will be to hide the bar after it is inactive for a few seconds:
    Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
       SeekBarIndex = SeekBarIndex + 
    1 'global int variable
       Dim MyIndex As Int
    If MyIndex <> SeekBarIndex Then Return
    End Sub
    jimmyF likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice