androidgestures

How to identify three finger tap in android


I want to detect three finger tap in android screen.I am able to detect up to two fingers.How to detect three fingers it?I heard some where that android is capable of detecting 2 fingers.Is it so?


Solution

  • This code will can help you:

    public boolean onTouchEvent(MotionEvent event)
    {
        int action = event.getAction();
        switch(action & MotionEvent.ACTION_MASK)
        {
            case MotionEvent.ACTION_POINTER_DOWN:
                // multitouch!! - touch down
                int count = event.getPointerCount(); // Number of 'fingers' in this time
                break;
        }
    }