什么原因导致Android中的MotionEvent.ACTION_CANCEL? [英] What causes a MotionEvent.ACTION_CANCEL in Android?
问题描述
onTouchListener
包含一个取消<动作。我没有找到任何文件的原因,希望有人能指出我正确的方向来调试这个问题 - 错误代码,源代码或一般知识。这是你正在寻找的:
ACTION_CANCEL发生在父母拥有动议时,
,例如当用户已经在列表视图中拖动足够的时候,
开始滚动,而不是让它按下它内的按钮
您可以在视图组中找到更多信息文档: onInterceptTouchEvent 。
希望这是您正在寻找的答案:
I am working through debugging some touch handling stuff on Android, and am trying to figure out why the MotionEvent sent to my View's onTouchListener
contains a cancel action. I have not been able to find any documentation on its cause, and was hoping someone could point me in the right direction for debugging this problem - error codes, source code, or some general knowledge.
Is this what you are looking for:
"ACTION_CANCEL occurs when the parent takes possession of the motion, for example when the user has dragged enough across a list view that it will start scrolling instead of letting you press the buttons inside of it. You can find out more about it at the viewgroup documentation: onInterceptTouchEvent."
Hope that is the answer you are looking for:
Resources: Motion Event, Stack Overflow.
这篇关于什么原因导致Android中的MotionEvent.ACTION_CANCEL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!