aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeListener.kt
blob: 3ea62b5b881dd8bd7e239e3908d37c0073ecac0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package ca.allanwang.kau.swipe

interface SwipeListener {
    /**
     * Invoked as the page is scrolled
     * Percent is capped at 1.0, even if there is a slight overscroll for the pages
     */
    fun onScroll(percent: Float, px: Int, edgeFlag: Int)

    /**
     * Invoked when page first consumes the scroll events
     */
    fun onEdgeTouch()

    /**
     * Invoked when scroll percent over the threshold for the first time
     */
    fun onScrollToClose(edgeFlag: Int)
}