Is it possible in Xamarin.Android to set event LongClick
click time or something similar? The click time as it is, is too short for me.
答案 0 :(得分:2)
LongClick timing is managed by the Android OS, so it cannot be directly modified. However, you could go around the problem by handling everything by yourself.
MotionEventActions.Down
and get the current time in milliseconds by using CurrentTimeMillis method.MotionEventActions.Up
to detect when the user lifts the finger. Calculate the time difference between touch up and touch down events and if it's long enough, do something.Here's some code samples related to touch events. It shows how to create the touch listener and react to touch events.