aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-05 14:47:58 -0700
committerAllan Wang <me@allanwang.ca>2017-07-05 14:47:58 -0700
commit36471abc904ff4aa3109bd06efbc3ed493f082b2 (patch)
tree7b7f8a9b7828d0171ad2b5854a67b0108e772de7 /core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt
parent10e2ee9d4f105d9737b98b1caacf5e6ccb1c3c7d (diff)
downloadkau-36471abc904ff4aa3109bd06efbc3ed493f082b2.tar.gz
kau-36471abc904ff4aa3109bd06efbc3ed493f082b2.tar.bz2
kau-36471abc904ff4aa3109bd06efbc3ed493f082b2.zip
Setup swipe for all directions
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt
index e9a872b..56085c8 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt
@@ -46,7 +46,7 @@ class SwipeBackPage(activity: Activity) : SwipeBackPageContract by SwipeBackLayo
//触发关闭Activity百分比
fun setClosePercent(percent: Float): SwipeBackPage {
- swipeBackLayout.scrollThreshold=percent
+ swipeBackLayout.scrollThreshold = percent
return this
}
@@ -54,11 +54,12 @@ class SwipeBackPage(activity: Activity) : SwipeBackPageContract by SwipeBackLayo
interface SwipeBackPageContract {
var swipeEnabled: Boolean
- var scrimColor:Int
+ var scrimColor: Int
val swipeBackLayout: SwipeBackLayout
- var scrollThreshold:Float
- var disallowIntercept:Boolean
- fun setEdgeSize(swipeEdge: Int)
+ var edgeSize: Int
+ var edgeFlag:Int
+ var scrollThreshold: Float
+ var disallowIntercept: Boolean
fun setEdgeSizePercent(swipeEdgePercent: Float)
fun addListener(listener: SwipeListener)
fun removeListener(listener: SwipeListener)