I have to take count for the total number of fingers clicked on screen.
Used Touch event as below :
relTouch.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
switch(event.getPointerCount()){
case 1:
Toast.makeText(MainActivity.this, "Single touch", Toast.LENGTH_SHORT).show();
break;
case 2:
Toast.makeText(MainActivity.this, "Double touch", Toast.LENGTH_SHORT).show();
break;
case 3:
Toast.makeText(MainActivity.this, "Triple touch", Toast.LENGTH_SHORT).show();
break;
}
return true;
}
});
It's working fine.
But, The issue is When I tap with more than one finger, It also giving me single click. If I tap with 3 fingers, it also gives me Single and Double click.
How to solve this ?