0

Im having problem with handling touch events, as far as i understand MotionEvent.Action_Move should register a touch that is not moving as well, i.e. press/hold?

But my code only registers when touch event is moving, and i have no idea why. Ive set setLongClickable(true) on the View, but that didn't help. Any ideas=

public boolean onTouch(View view, MotionEvent event) {

    int action = event.getAction();

    if (action== MotionEvent.ACTION_DOWN){
        //Do on press
    }
    else if (action== MotionEvent.ACTION_MOVE){
        //Continously do something while pressed
    }
    else if(action==MotionEvent.ACTION_UP){
        //Do on release
    }

    return true;
}
Fredkr
  • 723
  • 3
  • 8
  • 21
  • Check this post ,I have posted a detailed answer for your touch try [this](http://stackoverflow.com/questions/937313/android-basic-gesture-detection/15836492#15836492) – Viswanath Lekshmanan Jun 16 '13 at 17:41
  • Thanks, i was thinking about this as well, im sure it would work.But shouldn't the onTouch be able to handle this as well? i think it should. – Fredkr Jun 16 '13 at 17:45

0 Answers0