拦截父控件事件的设置

 

 

 

@Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        //requestDisallowInterceptTouchEvent(disallowIntercept);
        //disallowIntercept=true不让父元素拦截元素;disallowIntercept=false,没有拦截
        getParent().requestDisallowInterceptTouchEvent(true);
        return super.dispatchTouchEvent(ev);
    }

 

posted @ 2015-05-25 09:27  牧之丨  阅读(541)  评论(0编辑  收藏  举报