Math

Answered

editorview longpress in pen mode

Hi, 

I want to realize the long press function in writing mode to facilitate copying,what can i do? thx

Yibin  


Best Answer

Dear Heyb6,


thank you for contacting us.


Currently, the longPress is enabled via the gestureDetector.


So basically, in the InputController.java file we provide, if you comment the line "if (iinkPointerType == PointerType.TOUCH)", the gestureDetector will be enabled, and the onLongPress will be triggered even in pen/writing mode.


//if (iinkPointerType == PointerType.TOUCH)
{
gestureDetector.onTouchEvent(event);
}


Nevertheless, please note this will enable all the gestures (tap...), so you may need to deal with all the supported gestures. This has to be done according to your use-case.


Best regards,


Olivier

1 Comment

Answer

Dear Heyb6,


thank you for contacting us.


Currently, the longPress is enabled via the gestureDetector.


So basically, in the InputController.java file we provide, if you comment the line "if (iinkPointerType == PointerType.TOUCH)", the gestureDetector will be enabled, and the onLongPress will be triggered even in pen/writing mode.


//if (iinkPointerType == PointerType.TOUCH)
{
gestureDetector.onTouchEvent(event);
}


Nevertheless, please note this will enable all the gestures (tap...), so you may need to deal with all the supported gestures. This has to be done according to your use-case.


Best regards,


Olivier