1. dispatchTouchEvent 是处理触摸事件分发,执行super.dispatchTouchEvent(ev),事件向下分发。

    2. onInterceptTouchEvent是ViewGroup提供的方法,默认返回false,返回true表示拦截。

    3. onTouchEvent是View中提供的方法,ViewGroup也有这个方法,view中不提供onInterceptTouchEvent。view中默认返回true,表示消费了这个事件。

dispatchTouchEvent onInterceptTouchEvent onTouchEvent区分

 

相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-08-16
  • 2021-04-22
  • 2021-08-05
  • 2021-07-13
猜你喜欢
  • 2022-12-23
  • 2021-06-25
相关资源
相似解决方案