aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-07-01 23:32:16 -0700
committerAllan Wang <me@allanwang.ca>2019-07-01 23:32:16 -0700
commit347f820db539de4823572a22ae8c16611167af72 (patch)
treecc45aec161d2448e7745470e54fa0f94ca5b3350
parenta7de4466a5acb98eea8da479512b8016d31c4624 (diff)
downloadkau-347f820db539de4823572a22ae8c16611167af72.tar.gz
kau-347f820db539de4823572a22ae8c16611167af72.tar.bz2
kau-347f820db539de4823572a22ae8c16611167af72.zip
Revert viewdraghelper exposure
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt6
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java2
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml1
3 files changed, 4 insertions, 5 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 d26fb92..8f1da04 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt
@@ -236,10 +236,10 @@ internal class SwipeBackLayout @JvmOverloads constructor(
override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
if (!swipeEnabled || disallowIntercept) return false
- try {
- return dragHelper.shouldInterceptTouchEvent(event)
+ return try {
+ dragHelper.shouldInterceptTouchEvent(event)
} catch (e: Exception) {
- return false
+ false
}
}
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 dab9bb8..f6e907a 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java
+++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java
@@ -28,7 +28,7 @@ import static ca.allanwang.kau.swipe.SwipeBackHelperKt.SWIPE_EDGE_TOP;
* This is an extension of {@link androidx.customview.widget.ViewDragHelper}
* Along with additional methods defined in {@link ViewDragHelperExtras}
*/
-public class ViewDragHelper implements ViewDragHelperExtras {
+class ViewDragHelper implements ViewDragHelperExtras {
private static final String TAG = "ViewDragHelper";
/**
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 0a7b401..f91355b 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -11,7 +11,6 @@
<item text=":adapter: Make NoAnimatorChange an object; previously a class" />
<item text=":core: KPref now supports in memory only variants for testing; pass KPrefBuilderInMemory to KPref constructor" />
<item text=":core: KPref initializer takes in SharedPreferences so user can configure it" />
- <item text=":core: Enhanced swipe view and make drag helper public" />
<item text="" />
<item text="" />
<item text="" />