setOnTouchListener在小米手机中不走ACTION_UP而是走ACTION_CANCEL

单点触控:

MotionEvent.ACTION_DOWN:手指 初次接触到屏幕 时触发。
MotionEvent.ACTION_MOVE:手指 在屏幕上滑动 时触发,会多次触发。
MotionEvent.ACTION_UP:手指 离开屏幕 时触发。
MotionEvent.ACTION_CANCEL:事件 被上层拦截 时触发。
MotionEvent.ACTION_OUTSIDE:手指 不在控件区域 时触发。

小米手机中,当手指放在屏幕上,此时弹出popuwindow,当手指离开屏幕的时候ontouch方法竟然没有得到ACTION_UP这个行为,而是得到了ACTION_CANCEL行为。这是不同于其它手机的一个地方。

 

posted @ 2019-03-13 16:59  Prime_T  阅读(927)  评论(0编辑  收藏  举报