imageview的ontouch、button的ontouch和activity的ontouchevent
浙外 2017-08-18 01:21:59 前提:
在imageview上设置ontouchlistener,然后返回false;
在button上设置ontouchlistener,然后也返回false;
重写activicy的ontouchevent,最后返回true;
现象:
点击了imageview,执行了事件代码,同时因为返回false,所以继续会执行activity上的ontouchevent中的代码;
点击了button,执行了事件代码,但是同样返回false,后续并没有执行activity上的ontouchevent中的代码
为什么?