Screen Tap 双击

    // 全局时间记录时间记录
    private long firstTap = 0l;
    private long secondTap = 0l;

    // 双击事件--> 在MotionEvent.ACTION_UP时调用  (这里我用的300毫秒以内算双击)
    public boolean judgeDoubleTap()
    {

        if (this.firstTap == 0l)
        {
            this.firstTap = System.currentTimeMillis();
        }
        else
        {
            this.secondTap = System.currentTimeMillis();
            long time = this.secondTap - this.firstTap;
            if (time >= 0l && time <= 300l)
            { // 满足条件---> 双击
                this.firstTap = 0l;
                return true;
            }
            else
            { // 不满足条件
                this.firstTap = this.secondTap;
            }
        }
        return false;
    }    
原文地址:https://www.cnblogs.com/smile365/p/3197556.html