change swipe sensitivity
This commit is contained in:
parent
b6c79dae40
commit
34a3e9e5a3
1 changed files with 3 additions and 3 deletions
|
@ -167,9 +167,9 @@ class Swipy @JvmOverloads constructor(
|
|||
val totalDragDistance =
|
||||
Resources.getSystem().displayMetrics.heightPixels / dragDivider
|
||||
if (verticalPos == VerticalPosition.Top)
|
||||
topBeingSwiped.invoke(overscroll / totalDragDistance)
|
||||
topBeingSwiped.invoke(overscroll * 2 / totalDragDistance)
|
||||
else
|
||||
bottomBeingSwiped.invoke(overscroll / totalDragDistance)
|
||||
bottomBeingSwiped.invoke(overscroll * 2 / totalDragDistance)
|
||||
} else {
|
||||
val totalDragDistance =
|
||||
Resources.getSystem().displayMetrics.widthPixels / dragDivider
|
||||
|
@ -243,7 +243,7 @@ class Swipy @JvmOverloads constructor(
|
|||
|
||||
if (vertical) {
|
||||
val totalDragDistance = Resources.getSystem().displayMetrics.heightPixels / dragDivider
|
||||
if (overscrollDistance > totalDragDistance)
|
||||
if (overscrollDistance * 2 > totalDragDistance)
|
||||
if (verticalPos == VerticalPosition.Top)
|
||||
onTopSwiped.invoke()
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue