
Category: Synthesizer technology
Category: Music softwareQ:
How to set multiple conditions in onTouchEvent in android?
I am facing a little problem on detecting touch in android.
I can detect the type of the gesture with
@Override
public boolean onTouchEvent(MotionEvent event) {
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN: {
//do your actions
break;
}
case MotionEvent.ACTION_UP: {
//do your actions
break;
}
}
return true;
}
but if i want to set two conditions like this
@Override
public boolean onTouchEvent(MotionEvent event) {
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN: {
//do your actions
break;
}
case MotionEvent.ACTION_UP: {
//do your actions
break;
}
case MotionEvent.ACTION_POINTER_UP: { be359ba680
Related links:
Comentários