Search code examples
androidgesturesstroke

how to increase the gesture time out time


I have implemented multiple-stroke gestures in my app, but if the pause between strokes is too long it resets the gesture. Is there a way to increase the time allowed between strokes of a single gesture?


Solution

  • You can increase the time between strokes of a single gesture by using this

      android:fadeOffset="5000"<-- this value is in milliseconds.. 
    

    in xml

     <android.gesture.GestureOverlayView
    

    so android will wait for 5 sec time and in case no gesture is started.. then what you have drawn so far will be taken into consideration.. else the new gesture will be appended to first one.. makin it a single stroke..