Tunous / SwipeActionView

Android swipe-able view, which allows users to perform actions with swipe gestures.
Apache License 2.0
196 stars 16 forks source link

Swipe distance ratio customization #18

Closed Tunous closed 5 years ago

Tunous commented 5 years ago

Based on a425bfddc60ea10ed3f8a971bcdcc49d7b80761e from #16, this pull request adds a way to customize swipe distance ratio that is used to decide how far the user has to swipe before gesture callbacks can be executed. The default value stays at 80%.

Example

// Gesture callbacks will be executed when user reveals 50% of the background view and releases the finger
swipeView.activationDistanceRatio = 0.5f