修复了无法触发的bug

This commit is contained in:
董宏宇
2021-04-07 20:00:23 +08:00
parent e3450f20cf
commit b0f5bcb654
2 changed files with 2 additions and 2 deletions

1
.idea/gradle.xml generated
View File

@@ -91,6 +91,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -52,8 +52,7 @@ public class TopView extends FrameLayout {
originX = ev.getY();
} else if (ev.getAction() == MotionEvent.ACTION_MOVE) {
// 垂直滑动,事件拦截
return Math.abs(originY - ev.getY()) > ViewConfiguration.get(getContext()).getScaledTouchSlop()
||Math.abs(originX - ev.getX()) > ViewConfiguration.get(getContext()).getScaledTouchSlop();
return Math.abs(originY - ev.getY()) > ViewConfiguration.get(getContext()).getScaledTouchSlop();
}
return false;
}