How to identify three finger tap in android

北城余情 提交于 2019-12-19 02:39:09

问题


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?


回答1:


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;
    }
}


来源:https://stackoverflow.com/questions/7840854/how-to-identify-three-finger-tap-in-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!