如何确定三个手指轻点在机器人 [英] How to identify three finger tap in android

查看:154
本文介绍了如何确定三个手指轻点在机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检测三指敲击在安卓screen.I是能够检测多达两个fingers.How检测到三根手指呢?我听说一些地方,Android是能够检测2 fingers.Is会这样呢?

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?

推荐答案

这code将能帮助您:

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

这篇关于如何确定三个手指轻点在机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆