[英]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?当我在带有
onSwipe
过渡的MotionLayout
停止中间滑动时,有什么方法可以加速播放的动画? Currently it transitions very slowly to the start or end position.目前它非常缓慢地过渡到开始或结束位置。
I was wondering if there's such thing as autoComplete duration too.我想知道是否也有 autoComplete 持续时间之类的东西。 After some research I've found out that using
app:maxAcceleration
parameter on onSwipe
helps to gain the control over this duration.经过一番研究,我发现,使用
app:maxAcceleration
在参数onSwipe
有助于获得对这一持续时间的控制。
eg例如
<OnSwipe
app:maxAcceleration="40"
app:dragDirection="dragUp"
app:touchAnchorId="@+id/view_one"
app:touchAnchorSide="top"
app:touchRegionId="@id/view_one"/>
Can You explain more detailed what You want to do?你能更详细地解释一下你想做什么吗?
You can set the duration of Your transistion in Your XML File...if that was a part of Your question.您可以在您的 XML 文件中设置您的转换的持续时间...如果这是您问题的一部分。
<Transition
app:constraintSetStart="@+id/start"
app:constraintSetEnd="@+id/end"
app:duration="340">
</Transition>
GGK GGK
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.