constraintlayout icon indicating copy to clipboard operation
constraintlayout copied to clipboard

[MotionLayout] `OnSwipe` offset bug

Open kroegerama opened this issue 3 years ago • 3 comments

Note: This bug replaces #229

In this example of OnDrag, the drag handle moves faster than the cursor. It looks like there is an interpolator attached to the drag transition.

You can find an example project here. The relevant files are:

Version 2.1.0-beta02:

https://user-images.githubusercontent.com/1519044/119559086-80e86e80-bda2-11eb-8b16-5db077969820.mp4

Version 2.0.4:

https://user-images.githubusercontent.com/1519044/119559112-89d94000-bda2-11eb-9dfd-8398edee7294.mp4

kroegerama avatar May 25 '21 19:05 kroegerama

I have isolated the issue for this :

You can work around if if you have to. you have 3 states a,b,c a-|button>-b-|slider>-c The slider transition is getting set up while the button transition is still not done.

You can work around it for now by added a b' so a-|button>-b'-|auto>-b-|slider>-c

I am still working on what is going on inside MotionLayout

jafu888 avatar May 25 '21 22:05 jafu888

@jafu888 any progress to share on this weird behaviour?

Shusshu avatar Feb 22 '22 15:02 Shusshu

How to force speed up handle moves? dragScale is not working as expected

AlexSuvorov2k avatar Apr 26 '22 06:04 AlexSuvorov2k