public void requestDisallowInterceptTouchEvent(boolean paramBoolean) { super.requestDisallowInterceptTouchEvent(paramBoolean); if (paramBoolean) { e(); } }
@Override public boolean onTouchEvent(MotionEvent arg0) { // TODO Auto-generated method stub if (parent != null) { parent.requestDisallowInterceptTouchEvent(true); } return super.onTouchEvent(arg0); }
@Override public boolean dispatchTouchEvent(MotionEvent ev) { // TODO Auto-generated method stub if (parent != null) { parent.requestDisallowInterceptTouchEvent(true); } return super.dispatchTouchEvent(ev); }
/** * 用于屏蔽和打开底部id为mainScollLayout的父视图左右滑动手势 * * <p>如果底部没有id为mainScollLayout的view。则不执行任何方法。 */ private void postParentMoveViewNotification(boolean flage) { if (parentView == null && viewId != null) { // 有可能初始化时没找到view,再去找一遍。 packConflictViewId(viewId); } if (parentView != null) { parentView.requestDisallowInterceptTouchEvent(flage); } }
@Override public void requestDisallowInterceptTouchEvent(boolean b) { // if this is a List < L or another view that doesn't support nested // scrolling, ignore this request so that the vertical scroll event // isn't stolen if ((android.os.Build.VERSION.SDK_INT < 21 && mTarget instanceof AbsListView) || (mTarget != null && !ViewCompat.isNestedScrollingEnabled(mTarget))) { // Nope. } else { super.requestDisallowInterceptTouchEvent(b); } }