diff options
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt | 4 | ||||
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt index 1f564ce..d26fb92 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt @@ -162,12 +162,8 @@ internal class SwipeBackLayout @JvmOverloads constructor( init { dragHelper = ViewDragHelper.create(this, ViewDragCallback()) - val density = resources.displayMetrics.density - val minVel = MIN_FLING_VELOCITY * density //allow touch from anywhere on the screen edgeSize = Math.max(resources.displayMetrics.widthPixels, resources.displayMetrics.heightPixels) - minVelocity = minVel -// maxVelocity = 2.5f * minVel edgeFlag = edgeFlag sensitivity = 0.3f addListener(chromeFadeListener) diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java b/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java index ac7fb7e..dab9bb8 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java +++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java @@ -25,10 +25,10 @@ import static ca.allanwang.kau.swipe.SwipeBackHelperKt.SWIPE_EDGE_TOP; * of useful operations and state tracking for allowing a user to drag and reposition * views within their parent ViewGroup. * <p> - * This is an extension of {@link androidx.core.widget.ViewDragHelper} + * This is an extension of {@link androidx.customview.widget.ViewDragHelper} * Along with additional methods defined in {@link ViewDragHelperExtras} */ -class ViewDragHelper implements ViewDragHelperExtras { +public class ViewDragHelper implements ViewDragHelperExtras { private static final String TAG = "ViewDragHelper"; /** |