Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
case MotionEventCompat.ACTION_POINTER_UP:
onSecondaryPointerUp(ev);
break;
default:
break;
}

//如果是正在被下拉拖动,拦截,不往下传递;反之,你懂的
Expand Down Expand Up @@ -289,6 +291,8 @@ public boolean onTouchEvent(@NonNull MotionEvent ev) {
}
return false;//系列点击事件已经处理完,将处理权交还mTarget
}
default:
break;
}

return true;//该系列点击事件未处理完,消耗此系列事件
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public void onClick(View v) {
// case R.id.btn_ultra_refresh_layout:
// startActivity(new Intent(MainActivity.this, UltraPullToRefreshActivity.class));
// break;
default:
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
case MotionEventCompat.ACTION_POINTER_UP:
onSecondaryPointerUp(ev);
break;
default:
break;
}

//如果是正在被下拉拖动,拦截该事件,不往下传递;反之,你懂的
Expand Down Expand Up @@ -317,6 +319,8 @@ public boolean onTouchEvent(@NonNull MotionEvent ev) {
}
return false;//系列点击事件已经处理完,将处理权交还mTarget
}
default:
break;
}

return true;//该系列点击事件未处理完,消耗此系列事件
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ protected void onLayout(boolean changed, int left, int top, int right, int botto
break;
case REL_DRAG:
break;
default:
break;
}

}
Expand Down Expand Up @@ -185,6 +187,8 @@ protected void onDraw(Canvas canvas) {
case STOP:
drawDone(canvas);
break;
default:
break;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
if (dy > 0 && !canChildScrollUp()) {
return true;
}
default:
break;
}
return super.onInterceptTouchEvent(ev);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ public boolean onInterceptTouchEvent(MotionEvent e) {
return true;
}
break;
default:
break;
}
return super.onInterceptTouchEvent(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,8 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
mIsBeingDragged = false;
mActivePointerId = INVALID_POINTER;
break;
default:
break;
}

//如果正在被拖拽,拦截该系列的点击事件,并调用自己的onTouchEvent()来处理
Expand Down Expand Up @@ -997,6 +999,8 @@ public boolean onTouchEvent(MotionEvent ev) {
}
case MotionEvent.ACTION_CANCEL:
return false;
default:
break;
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public boolean onInterceptTouchEvent(@NonNull MotionEvent ev) {
case MotionEventCompat.ACTION_POINTER_UP:
onSecondaryPointerUp(ev);
break;
default:
break;
}

return mIsBeingDragged;
Expand Down Expand Up @@ -208,6 +210,8 @@ public boolean onTouchEvent(@NonNull MotionEvent ev) {
mActivePointerId = INVALID_POINTER;
return false;
}
default:
break;
}

return true;
Expand Down