Ok, I have to be honest here, I have not played with android yet, although I am going to do it soon. However, I was working on a Microsoft Surface table.
If the standard android library does not implement functionality to detect any touch and hold event, I suggest the following:
I think you could easily implement such an assistant yourself. What you probably want to do is add a listener to the touch event of this canvas. The moment your finger touches the canvas, you start the timer. When the timer ends, you fire your desired event. However, you will also need to implement several other things. When the finger moves beyond a certain threshold or the finger rises again, the timer must be stopped and cleaned so that it no longer works.
In this scenario, you created the touch and hold script for yourself. All you have to pay attention to is that you turn it off when adding touch manipulations.
(I really believe that the standard sensory library should contain something similar to this functionality!)
From what I could find with a few searches, it was:
@Override public void onLongPress(MotionEvent e) {
(Otherwise, you can find something to your taste in the GestureDetector?)
The copypaste function uses the ClipboardManager. All you need to do is create a pop-up menu containing copies and pasting images with the appropriate text and hooks for this ClipboardManager.
wvdhouten
source share