1993hzw / Doodle

Image doodle for Android, with functions such as undo, zoom, move, text, image, etc. Also a powerful, customizable and extensible doodle framework & multi-function drawing board. Android图片涂鸦,具有撤消,缩放,移动,添加文字,贴图等功能。还是一个功能强大,可自定义和可扩展的涂鸦框架、多功能画板。
1.13k stars 252 forks source link

长按事件 #50

Closed wuh876 closed 4 years ago

wuh876 commented 4 years ago

@Override public void onLongPress(MotionEvent e) { }

这个事件怎么不执行呢

1993hzw commented 4 years ago

具体你是怎么监听的呢

wuh876 commented 4 years ago

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 commented 4 years ago

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

wuh876 commented 4 years ago

谢谢