Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit 8c1464d

Browse files
dtvc87dtvc87
andauthored
Check wether we can scroll vertically in the drag direction (#173)
Co-authored-by: dtvc87 <dtvc87@gmail.com>
1 parent 51622e3 commit 8c1464d

File tree

1 file changed

+1
-1
lines changed
  • constraintlayout/constraintlayout/src/main/java/androidx/constraintlayout/motion/widget

1 file changed

+1
-1
lines changed

constraintlayout/constraintlayout/src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2921,7 +2921,7 @@ public void onNestedPreScroll(@NonNull View target, int dx, int dy, @NonNull int
29212921

29222922
if (scene.getMoveWhenScrollAtTop()) {
29232923
// This blocks transition during scrolling
2924-
if ((mTransitionPosition == 1 || mTransitionPosition == 0) && target.canScrollVertically(-1)) {
2924+
if ((mTransitionPosition == 1 || mTransitionPosition == 0) && target.canScrollVertically(dy)) {
29252925
return;
29262926
}
29272927
}

0 commit comments

Comments
 (0)