Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

长按事件 #50

Closed
wuh876 opened this issue May 9, 2020 · 4 comments
Closed

长按事件 #50

wuh876 opened this issue May 9, 2020 · 4 comments

Comments

@wuh876
Copy link

wuh876 commented May 9, 2020

@OverRide
public void onLongPress(MotionEvent e) {
}

这个事件怎么不执行呢

@1993hzw
Copy link
Owner

1993hzw commented May 10, 2020

具体你是怎么监听的呢

@wuh876
Copy link
Author

wuh876 commented May 11, 2020

mTouchGestureListener = new DoodleOnTouchGestureListener(mDoodleView,
new DoodleOnTouchGestureListener.ISelectionListener() {
@OverRide
public void onSelectedItem(IDoodle doodle, IDoodleSelectableItem selectableItem, boolean selected) {
}

                    @Override
                    public void onCreateSelectableItem(IDoodle doodle, float x, float y) {
                  
                    }
                }) {
            @Override
            public boolean onDoubleTap(MotionEvent e) {

return super.onDoubleTap(e);
}

            @Override
            public void onLongPress(MotionEvent e) {
          
            }

        };

@1993hzw
Copy link
Owner

1993hzw commented Jul 4, 2020

在DoodleTouchDetector里禁掉了长按事件, setIsLongpressEnabled(false). 因为这个交互跟其他交互有冲突

@1993hzw 1993hzw closed this as completed Jul 4, 2020
@wuh876
Copy link
Author

wuh876 commented Jul 6, 2020

谢谢

@chgmxx chgmxx mentioned this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants