Code example for PointF

Methods: set

0
        int yDiff = (int) Math.abs(curr.y - start.y);
        // Log.d("OnTouch", String.format("%d, %d, action=%d", xDiff, yDiff, 
        // event.getAction())); 
        switch (event.getAction()) {
        case MotionEvent.ACTION_DOWN:
            last.set(curr);
            start.set(last);
            checkForLongClick(0); 
            break; 
        case MotionEvent.ACTION_MOVE:
            if (xDiff > LONG_CLICK_TOLERANCE || yDiff > LONG_CLICK_TOLERANCE) {
                clearCheckForLongClick(); 
            } 
            break; 
        default: 
            clearCheckForLongClick(); 
            break; 
        } 
        return true; // indicate event was handled 
    } 
Contextual code suggestions in your IDE  Get Codota for Java