android中MotionEvent.ACTION_CANCEL事件如何被触发?
16lz
2021-01-23
对于这个问题,android文档的说明很简短,想看明白很难。国外一网页说的还比较详细,写在这里分享给大家:
原文是这样的:
You receive this when a parent takes possession of the motion, forexample when the user has dragged enough across a list view or scrollview that it will start scrolling instead of letting you press thebuttons inside of it.
意思是这样的:
当你的手指(或者其它)移动屏幕的时候会触发这个事件,比如当你的手指在屏幕上拖动一个listView或者一个ScrollView而不是去按上面的按钮时会触发这个事件。
更多相关文章
- Android 中与 Touch 事件分发和消费机制
- Android 常用的ui(单选框 多选框 下拉列表框 拖动条)
- Android ViewGroup事件分发机制
- android:实现双击事件(DoubleClick)
- Android 图片缩放,手势,事件
- Android回调事件传播-android学习之旅(四十五)
- Android UI控件详解-Button(按钮)点击事件的5种写法