Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MotionLayout onSwipe autocomplete speed

Is there any way I can speed up the animation that plays when I stop mid-swipe in a MotionLayout with an onSwipe transition? Currently it transitions very slowly to the start or end position.

like image 473
sunilson Avatar asked Jun 24 '19 07:06

sunilson


1 Answers

I was wondering if there's such thing as autoComplete duration too. After some research I've found out that using app:maxAcceleration parameter on onSwipe helps to gain the control over this duration.

e.g.

<OnSwipe
        app:maxAcceleration="40"
        app:dragDirection="dragUp"
        app:touchAnchorId="@+id/view_one"
        app:touchAnchorSide="top"
        app:touchRegionId="@id/view_one"/>
like image 89
Oleksii Urusov Avatar answered Oct 07 '22 08:10

Oleksii Urusov