/**
* Pass the touch screen motion event down to the target view, or this
* view if it is the target.
*
* @param event The motion event to be dispatched.
* @return True if the event was handled by the view, false otherwise.
*/
public boolean dispatchTouchEvent(MotionEvent event) {
if (!onFilterTouchEventForSecurity(event)) {
return false;
}
if (mOnTouchListener != null && (mViewFlags & ENABLED_MASK) == ENABLED &&
mOnTouchListener.onTouch(this, event)) {
return true;
}
return onTouchEvent(event);
}如果你没看懂,http://blog.youkuaiyun.com/lmj623565791/article/details/38960443
本文介绍了一个用于处理触摸屏运动事件的方法dispatchTouchEvent。该方法将事件传递给目标视图或当前视图,如果它是目标的话。文章详细解释了如何判断事件是否被视图处理,并返回相应的布尔值。
2738

被折叠的 条评论
为什么被折叠?



