If you don't have a requirement about how long should be the time to
trigger a long press, you could use

android.view.GestureDetector;

android.view.GestureDetector.SimpleOnGestureListener;

If you need to detect a long in a specific View object, what I do is
to register a OnTouchListener in my View object, that will redirect
the MotioEvent to the GestureDetector. At this point I'm able to
record what View was touched, and keep it in a variable of my current
Activity. Then in the gesture listener I took this variable and use
it. But if someone else knows a better approach I would like to hear
it :).

Best,

fr4gus

On Aug 30, 5:12 am, eminemence <[email protected]> wrote:
> Hi,
> I want to figure out how to detect that the user has been doing a long
> touch press on the screen?
> Most of the solutions that I see assume that the DOWN + UP sequence of
> events.
> Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to