diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-05 23:44:01 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-07-05 23:44:01 -0700 |
commit | f0731069057bb52614ba184389eb1432d9ba7e16 (patch) | |
tree | 0bf8a3e6a3a217e1f7167fcf358a742d9de982d2 /core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt | |
parent | e803969433b56e7e6ef4b02ed01aaa2e410eb1f9 (diff) | |
download | kau-f0731069057bb52614ba184389eb1432d9ba7e16.tar.gz kau-f0731069057bb52614ba184389eb1432d9ba7e16.tar.bz2 kau-f0731069057bb52614ba184389eb1432d9ba7e16.zip |
More swipe customization
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.kt | 33 |
1 files changed, 32 insertions, 1 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 cb28342..81ddb62 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackPage.kt @@ -50,16 +50,47 @@ class SwipeBackPage(activity: Activity) : SwipeBackContract by SwipeBackLayout(a } interface SwipeBackContract { + /** + * Toggle main touch intercept + */ var swipeEnabled: Boolean + /** + * Set the background color for the outside of the page + * This dynamically fades as the page gets closer to exiting + */ var scrimColor: Int val swipeBackLayout: SwipeBackLayout var edgeSize: Int + /** + * Set the flag for which edge the page is scrolling from + */ var edgeFlag: Int + /** + * Set the scrolling threshold for wish a page is deemed closing + */ var scrollThreshold: Float var disallowIntercept: Boolean + /** + * Set the min velocity of the view drag helper + */ var minVelocity: Float + /** + * Set the max velocity of the view drag helper + */ var maxVelocity: Float - var sensitivity:Float + /** + * Set the sensitivity of the view drag helper + */ + var sensitivity: Float + /** + * Dynamically change the alpha for the status bar and nav bar + * as the page scrolls + */ + var transitionSystemBars: Boolean + + /** + * Sets edge size based on screen size + */ fun setEdgeSizePercent(swipeEdgePercent: Float) fun addListener(listener: SwipeListener) fun removeListener(listener: SwipeListener) |