Code example for GestureDetector.OnGestureListener

Methods: onLongPress

0
        return mInLongPress;
    } 
 
    private void dispatchLongPress() { 
        mInLongPress = true;
        mListener.onLongPress(mCurrentDownEvent);
    } 
 
    protected boolean hasPendingMessage() { 
        return mHandler.hasMessages(LONG_PRESS);
    } 
 
    void onOfferTouchEventToNative(MotionEvent event) {
        if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
            mMoveConfirmed = false;
            mTouchInitialX = Math.round(event.getX());
            mTouchInitialY = Math.round(event.getY());
        } 
    } 
 
    boolean confirmOfferMoveEventToNative(MotionEvent event) {