Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Touch event

    • 1
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 227
    Answer it

    Hello, I have a doubt regarding Touch Event. Say I need to write something like my name "Sangita" with just single tap on the keypad. In short I need to automate the whole process in one touch that would otherwise take 7 touches. The first touch works fine. I am using custom popup for keys. For the first touch and release it works fine and puts "S" on the EditText. From SoftKeyboard service I am resending the MotionEvent to LatinKeyboardView's OnTouch(). With the RnD I've done, the first touch since it is user generated is properly synced and hence there is a min of 500 ms gap where the pop is rendered and visible. For the second letter "a" however, I am unsure how to make the event last there in for min 500ms. As a result the duration between second touch event and popup is very less ie 20-30ms for which the popup doesn't render. Any ideas how to make the second touch event retain in LatinKeyboard view for 500ms and then convert it to up and send "a" to EditText? Thanks in advance,

 1 Answer(s)

  • Hello Sangita ,

    As per your query what I am getting is you want to delay the time in which popup gets generated. Your first touch event is taking 500ms while the subsequent others are just taking 20-30ms thus causing the issue.

    In my opinion there might be some function which is attached to your input box touch event . What exactly you can do is delay opening of popup on your own by making use of jQuery delay() method.

    Tyr to add some code like this :

    $( "div.first" ).slideUp( 300 ).delay( 800 ) where 800 is 800ms

    The code should be something like this :
    1) Whenever you make a touch-event first delay() function should get fired
    2) After delay of 500ms your code or function to open popup should start working.

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: