How to get a continuous Touch Event?

Posted by daliz on Stack Overflow See other posts from Stack Overflow or by daliz
Published on 2010-03-29T16:21:19Z Indexed on 2010/03/29 16:23 UTC
Read the original article Hit count: 385

Filed under:
|
|
|

My class extends View and I need to get continuous touch events on it.

If I use:

public boolean onTouchEvent(MotionEvent me) {

    if(me.getAction()==MotionEvent.ACTION_DOWN) {
        myAction();
    }
    return true;
}

... the touch event is captured once.

What if I need to get continuous touches without moving the finger? Please, tell me I don't need to use threads or timers. My app is already too much heavy.

Thanks.

© Stack Overflow or respective owner

Related posts about android

Related posts about continuous