文章标题

来源:互联网 发布:网络双生是什么意思 编辑:程序博客网 时间:2024/06/15 20:38

View的事件分发三个主要方法简单介绍!

public boolean disoatchTouchEvent(MotionEvent event);进行事件分发
public boolean onTouchEvent(MotionEvent event);进行事件处理
public boolean onInterceptTouchEvent(MotionEvent event);进行事件拦截ViewGroup才有的方法,普通View下没有子View就没有必要再拦截了。
1 0
原创粉丝点击