Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何在某物被长按和某物被释放时执行某物?我正在使用手势检测器来处理事件
长按是一个特定的动作。为了您的目的,我认为您将不得不查看onTouchEvent(MotionEvent ev)
onTouchEvent(MotionEvent ev)
ACTION_DOWN是按下开始的时间。
ACTION_UP是它被释放的时间。