Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OnSwipe] touchAnchor moves faster than cursor / touchRegion ignored after first touch #229

Closed
kroegerama opened this issue May 24, 2021 · 14 comments
Labels
bug Something isn't working

Comments

@kroegerama
Copy link

kroegerama commented May 24, 2021

I am experiencing a few bugs in the current MotionLayout,

  • I have set a touchAnchorId (Have the drag act as if it is moving the "touchAnchorSide" of this object), but the AnchorView moves faster than my finger
  • I have set a touchRegionId (Limits the region that the touch can be start in to the bounds of this view (even if the view is invisible)), but after the first touch up, the whole MotionLayout reacts to the swipe
  • WRAP_CONTENT doesn't work for TextViews

I already tried using app:dragScale="1", but it had no effect. Also, I tried app:motionInterpolator="linear" on the Transition, but it didn't have an effect either.

This happens on ConstraintLayout version 2.1.0-beta02. The stable version 2.0.4 works fine.

The MotionScene is quite big. This is the relevant Transition:

    <Transition
        android:id="@+id/transitionDrag"
        app:constraintSetEnd="@id/stateDragEnd"
        app:constraintSetStart="@id/stateDragStart"
        app:motionInterpolator="linear">

        <OnSwipe
            app:autoCompleteMode="spring"
            app:dragDirection="dragEnd"
            app:dragScale="1"
            app:dragThreshold="1"
            app:onTouchUp="autoCompleteToStart"

            app:springBoundary="bounceStart"
            app:springDamping="40"
            app:springMass="1"
            app:springStiffness="750"
            app:springStopThreshold="5"

            app:touchAnchorId="@id/dragHandle"
            app:touchAnchorSide="middle"
            app:touchRegionId="@id/dragHandle" />
    </Transition>

screen-20210524-112237

Edit:
layout_width="wrap_content" doesn't work in this scenario either. ("Quick Buy" should be a single line)

@kroegerama kroegerama added the bug Something isn't working label May 24, 2021
@jafu888
Copy link
Collaborator

jafu888 commented May 24, 2021

"touchAnchorSide" has no "middle" it can only be top/left/right/bottom/start/end
Do not use touchRegionID use limitBoundsTo

@kroegerama
Copy link
Author

Thanks @jafu888 !

However, I'm getting still the same behaviour with this OnSwipe definition:

        <OnSwipe
            app:autoCompleteMode="spring"
            app:dragDirection="dragEnd"
            app:dragThreshold="0"
            app:onTouchUp="autoCompleteToStart"

            app:springBoundary="bounceStart"
            app:springDamping="40"
            app:springMass="1"
            app:springStiffness="750"
            app:springStopThreshold="5"

            app:touchAnchorId="@id/dragHandle"
            app:touchAnchorSide="end"
            app:limitBoundsTo="@id/dragHandle" />

Also, I just searched for your suggested fixes and couldn't really find any reason in the source code for them to work. Am I missing something?

  • 2.1.0-beta02 contains these lines in the attrs.xml. It includes a middle option. Link to source
        <attr format="enum" name="touchAnchorSide">
            <enum name="top" value="0"/>
            <enum name="left" value="1"/>
            <enum name="right" value="2"/>
            <enum name="bottom" value="3"/>
            <enum name="middle" value="4"/>
            <enum name="start" value="5"/>
            <enum name="end" value="6"/>
        </attr>
  • limitBoundsTo seems to be not referenced in MotionLayout or ConstraintLayout at all. It's only defined in the attrs.xml. search for limitBoundsTo in androidx/constraintlayout

@jafu888
Copy link
Collaborator

jafu888 commented May 24, 2021

Layout

  <?xml version="1.0" encoding="utf-8"?>
 <androidx.constraintlayout.motion.widget.MotionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/rootView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#BECEED"
    app:layoutDescription="@xml/bug_007_scene"
    tools:context=".OnCreateTransiton"
    >

    <TextView
        android:id="@+id/track"
        android:layout_width="400dp"
        android:layout_height="50dp"
        android:background="#FF0"
        android:text="track"
        android:gravity="center"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        />

    <View
        android:id="@+id/dragHandle"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#0F0"
        app:layout_constraintStart_toStartOf="@+id/track"
        app:layout_constraintBottom_toBottomOf="@+id/track"
        app:layout_constraintEnd_toEndOf="@+id/track"
        app:layout_constraintTop_toTopOf="@+id/track"
        app:layout_constraintHorizontal_bias="0"
        />

</androidx.constraintlayout.motion.widget.MotionLayout>

MotionScene

<?xml version="1.0" encoding="utf-8"?>
  <MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:motion="http://schemas.android.com/apk/res-auto">
 <ConstraintSet android:id="@+id/a" />
 <ConstraintSet android:id="@+id/b">
     <Constraint
        android:id="@id/dragHandle"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#0F0"
        motion:layout_constraintStart_toStartOf="@+id/track"
        motion:layout_constraintBottom_toBottomOf="@+id/track"
        motion:layout_constraintEnd_toEndOf="@+id/track"

        motion:layout_constraintTop_toTopOf="@+id/track"
        motion:layout_constraintHorizontal_bias="1"

        />
</ConstraintSet>

<Transition
    motion:constraintSetEnd="@id/b"
    motion:constraintSetStart="@id/a"
    motion:motionInterpolator="cubic(0.34, 1.56, 0.64, 1)"
    motion:duration="300">
    <OnSwipe motion:touchAnchorId="@id/dragHandle"
        motion:dragDirection="dragRight"
        motion:limitBoundsTo="@id/dragHandle"/>
</Transition>

</MotionScene>
v1.mp4

@jafu888
Copy link
Collaborator

jafu888 commented May 24, 2021

I put a small example above.
Which works.
I am not sure what all you are doing.
Ether simplify your example and post it. or modify my example till it breaks.

@kroegerama
Copy link
Author

Sorry for all the confusion. Here is my full Layout / ConstraintSet:

Layout

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="44dp"
    app:layoutDescription="@xml/quick_buy"
    tools:layout_gravity="center_vertical">

    <View
        android:id="@+id/master"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:background="@drawable/quickbuy_background" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/textQuickBuy"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:background="@drawable/quickbuy_ripple"
        android:drawablePadding="8dp"
        android:gravity="center_vertical"
        android:paddingHorizontal="10dp"
        android:text="Quick buy"
        android:textAllCaps="true"
        android:textColor="@color/white"
        android:textSize="14sp"
        app:drawableStartCompat="@drawable/ic_quickbuy"
        app:fontFamily="@font/catamaran_bold" />

    <View
        android:id="@+id/track"
        android:layout_width="0dp"
        android:layout_height="32dp"
        android:background="@drawable/quickbuy_progress" />

    <androidx.appcompat.widget.AppCompatImageButton
        android:id="@+id/cancel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/quickbuy_ripple"
        android:padding="6dp"
        app:srcCompat="@drawable/ic_cancel"
        app:tint="@color/white" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/state"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:gravity="center"
        android:text="Ziehen zum Bestellen"
        android:textColor="@color/white"
        android:textSize="14sp"
        app:fontFamily="@font/catamaran_bold" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/dragHandle"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:background="@drawable/quickbuy_thumb"
        android:elevation="4dp"
        android:outlineProvider="background"
        android:scaleType="center"
        app:srcCompat="@drawable/quickbuy_handle" />

</androidx.constraintlayout.motion.widget.MotionLayout>

MotionScene

<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <Transition
        android:id="@+id/transitionStartToDragging"
        app:constraintSetEnd="@id/stateDragStart"
        app:constraintSetStart="@id/stateStart"
        app:duration="300"
        app:motionInterpolator="easeOut">
        <OnClick
            app:clickAction="transitionToEnd"
            app:targetId="@+id/textQuickBuy" />
    </Transition>
    <Transition
        android:id="@+id/transitionDraggingToStart"
        app:constraintSetEnd="@id/stateStart"
        app:duration="300"
        app:motionInterpolator="easeOut">
        <OnClick
            app:clickAction="transitionToEnd"
            app:targetId="@+id/cancel" />
    </Transition>
    <Transition
        android:id="@+id/transitionDrag"
        app:constraintSetEnd="@id/stateDragEnd"
        app:constraintSetStart="@id/stateDragStart"
        app:duration="300"
        app:motionInterpolator="cubic(0.34, 1.56, 0.64, 1)">

        <OnSwipe
            app:autoCompleteMode="spring"
            app:dragDirection="dragEnd"
            app:dragThreshold="0"
            app:limitBoundsTo="@id/dragHandle"

            app:onTouchUp="autoCompleteToStart"
            app:springBoundary="bounceStart"
            app:springDamping="40"
            app:springMass="1"
            app:springStiffness="750"

            app:springStopThreshold="5"
            app:touchAnchorId="@id/dragHandle"
            app:touchAnchorSide="end" />
    </Transition>

    <ConstraintSet android:id="@+id/stateStart">
        <Constraint
            android:id="@+id/master"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            app:layout_constraintEnd_toEndOf="@id/textQuickBuy"
            app:layout_constraintStart_toStartOf="parent" />
        <Constraint
            android:id="@+id/textQuickBuy"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="@id/master"
            app:layout_constraintStart_toStartOf="@id/master"
            app:layout_constraintTop_toTopOf="@id/master"
            app:layout_constraintWidth="wrap_content_constrained" />
        <Constraint
            android:id="@+id/dragHandle"
            android:layout_width="36dp"
            android:layout_height="36dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/track"
            android:layout_width="0dp"
            android:layout_height="32dp"
            android:layout_marginEnd="6dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="@id/master"
            app:layout_constraintEnd_toEndOf="@id/master"
            app:layout_constraintStart_toStartOf="@id/master"
            app:layout_constraintTop_toTopOf="@id/master" />
        <Constraint
            android:id="@+id/cancel"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/state"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="@id/track"
            app:layout_constraintEnd_toEndOf="@id/track"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="@id/track" />
    </ConstraintSet>
    <ConstraintSet android:id="@+id/stateDragStart">
        <Constraint
            android:id="@+id/master"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />
        <Constraint
            android:id="@+id/textQuickBuy"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="@id/master"
            app:layout_constraintStart_toStartOf="@id/master"
            app:layout_constraintTop_toTopOf="@id/master" />
        <Constraint
            android:id="@+id/dragHandle"
            android:layout_width="36dp"
            android:layout_height="36dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/track"
            android:layout_width="0dp"
            android:layout_height="32dp"
            android:layout_marginEnd="6dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/cancel"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/cancel"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/state"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="@id/track"
            app:layout_constraintEnd_toEndOf="@id/track"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="@id/track" />
    </ConstraintSet>
    <ConstraintSet
        android:id="@+id/stateDragEnd"
        app:deriveConstraintsFrom="@id/stateDragStart">
        <Constraint
            android:id="@+id/dragHandle"
            android:layout_width="36dp"
            android:layout_height="36dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="@id/track"
            app:layout_constraintTop_toTopOf="parent" />
    </ConstraintSet>

</MotionScene>

@jafu888
Copy link
Collaborator

jafu888 commented May 24, 2021

Short answer - set :
motion:springStopThreshold="1"

I will try and explain.
The springStopThreshold is set to low so the animation does not stop very quickly.
So when you drag it springs back and it is actually still vibrating. for a few seconds.
The system is designed to allow you to touch anywhere after touch up but before it auto completes.

Other things to consider....
NeverComplete
motion:onTouchUp="neverCompleteToEnd"
This means you can never end. autoCompleteToStart means if you do not drag all the way to the end it will go back to the start.

BounceStart
motion:springBoundary="bounceStart"
This makes the start of the track act as a "wall" that the dragHandle bounces off.
Otherwise it will overshoot the track. (but that is an effect you might prefer)

@kroegerama
Copy link
Author

Thank you so much for trying to help!

motion:springStopThreshold="1"

Unfortunately, this didn't change anything.

Other things to consider....
NeverComplete
motion:onTouchUp="neverCompleteToEnd"
This means you can never end. autoCompleteToStart means if you do not drag all the way to the end it will go back to the start.

autoCompleteToStart is in fact what I want the Animation to work like. The only way to finish the swipe should be if the user swipes all the way to the right. If the user swipes completely to the right, the handle should keep staying there.

motion:springBoundary="bounceStart"
This makes the start of the track act as a "wall" that the dragHandle bounces off.
Otherwise it will overshoot the track. (but that is an effect you might prefer)

I prefer the wall effect. But may change it later to overshoot, if our Designer likes it more.

Here is how the View works now (code same as above, but with springStopThreshold="1":

screen-20210525-001854.2.mp4
  • You see the drag handle moving faster than my finger. Looks like some forced interpolator.
  • The animation does not stop after the spring animation (see the ongoing fps counter)
  • "Quick Buy" is multiline, but has layout_width set to wrap_content

@jafu888
Copy link
Collaborator

jafu888 commented May 25, 2021

Increase the threshold (or increase the dampening ) till it stops quickly.

@jafu888
Copy link
Collaborator

jafu888 commented May 25, 2021

Thanks for showing the video it helps.

@jafu888
Copy link
Collaborator

jafu888 commented May 25, 2021

if you move the transition "transitionDrag" to the top of the list of transitions. it works!

Note: the initial state (ConstraintSet) of a motion layout is the starting state of the first Transition.

So in your original configuration you started off in "stateStart" (coming from transitionStartToDragging)
Some how on clicking it was jumping into the transition.

There is a bug here (It should not drop into the transitionDrag.) But fixing it will brake you.

I am confused as to what exactly is the interaction you were hoping for with transitionStartToDragging and its stateStart
If you can describe the UI you are trying to go for I might be able to provide

@kroegerama
Copy link
Author

kroegerama commented May 25, 2021

I just tried app:springStopThreshold="100" and also app:springStopThreshold="1000000", but the spring transition still didn't stop. Same when I put the OnSwipe transition as the first transition in the MotionScene.

We may need to split this ticket to track all three bugs separately...

The View should work like this (and did in Version 2.0.4). The only difference is the spring animation`:

  1. User clicks on 'Quick Buy' -> View transitions to the track bar (transitionStartToDragging)
  2. The user swipes the handle all the way to the right -> the handle stays on the right (stateDragEnd)
  3. The center text will change, the view will be disabled, and a network call will be made

In step 2, the user can click the X-Button to revert back to the 'Quick Buy' state. (transitionDraggingToStart)
In step 3, if the user lets the handle go while dragging, it should automatically transition back to the left. (stateDragStart)

I made a comparison of version 2.0.4 vs. 2.1.0-beta02

As I cannot use the spring-animation in 2.0.4, I reverted back to my original OnSwipe. It clearly shows the two bugs:

  • WrapContent of TextView calculated in a wrong way
  • the handle moves faster than my finger

Here is how it works with version 2.0.4

screen-20210525-092614.2.mp4

And on 2.1.0-beta02 it has the swipe/wrapcontent problems

screen-20210525-093714.2.mp4

This is the MotionScene I used in both of these videos

<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <Transition
        android:id="@+id/transitionStartToDragging"
        app:constraintSetEnd="@id/stateDragStart"
        app:constraintSetStart="@id/stateStart"
        app:duration="300"
        app:motionInterpolator="easeOut">
        <OnClick
            app:clickAction="transitionToEnd"
            app:targetId="@+id/textQuickBuy" />
    </Transition>
    <Transition
        android:id="@+id/transitionDraggingToStart"
        app:constraintSetEnd="@id/stateStart"
        app:duration="300"
        app:motionInterpolator="easeOut">
        <OnClick
            app:clickAction="transitionToEnd"
            app:targetId="@+id/cancel" />
    </Transition>
    <Transition
        android:id="@+id/transitionDrag"
        app:constraintSetEnd="@id/stateDragEnd"
        app:constraintSetStart="@id/stateDragStart">

        <OnSwipe
            app:dragDirection="dragEnd"
            app:limitBoundsTo="@+id/dragHandle"
            app:maxAcceleration="600"
            app:onTouchUp="autoCompleteToStart"
            app:touchAnchorId="@+id/dragHandle"
            app:touchRegionId="@id/dragHandle"
            app:touchAnchorSide="middle" />
    </Transition>

    <ConstraintSet android:id="@+id/stateStart">
        <Constraint
            android:id="@+id/master"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            app:layout_constraintEnd_toEndOf="@id/textQuickBuy"
            app:layout_constraintStart_toStartOf="parent" />
        <Constraint
            android:id="@+id/textQuickBuy"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="@id/master"
            app:layout_constraintStart_toStartOf="@id/master"
            app:layout_constraintTop_toTopOf="@id/master" />
        <Constraint
            android:id="@+id/dragHandle"
            android:layout_width="36dp"
            android:layout_height="36dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/track"
            android:layout_width="0dp"
            android:layout_height="32dp"
            android:layout_marginEnd="6dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="@id/master"
            app:layout_constraintEnd_toEndOf="@id/master"
            app:layout_constraintStart_toStartOf="@id/master"
            app:layout_constraintTop_toTopOf="@id/master" />
        <Constraint
            android:id="@+id/cancel"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/state"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="@id/track"
            app:layout_constraintEnd_toEndOf="@id/track"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="@id/track" />
    </ConstraintSet>
    <ConstraintSet android:id="@+id/stateDragStart">
        <Constraint
            android:id="@+id/master"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />
        <Constraint
            android:id="@+id/textQuickBuy"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="@id/master"
            app:layout_constraintStart_toStartOf="@id/master"
            app:layout_constraintTop_toTopOf="@id/master" />
        <Constraint
            android:id="@+id/dragHandle"
            android:layout_width="36dp"
            android:layout_height="36dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/track"
            android:layout_width="0dp"
            android:layout_height="32dp"
            android:layout_marginEnd="6dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/cancel"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/cancel"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
        <Constraint
            android:id="@+id/state"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="@id/track"
            app:layout_constraintEnd_toEndOf="@id/track"
            app:layout_constraintStart_toStartOf="@id/track"
            app:layout_constraintTop_toTopOf="@id/track" />
    </ConstraintSet>
    <ConstraintSet
        android:id="@+id/stateDragEnd"
        app:deriveConstraintsFrom="@id/stateDragStart">
        <Constraint
            android:id="@+id/dragHandle"
            android:layout_width="36dp"
            android:layout_height="36dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="@id/track"
            app:layout_constraintTop_toTopOf="parent" />
    </ConstraintSet>

</MotionScene>

@jafu888
Copy link
Collaborator

jafu888 commented May 25, 2021

Yes split it.
And try and isolate the behaviors and try and produce examples I can replicate (Does the XML above produce the video or is there code involved ?).
Ideally A single transition (no code) that produces :

  • The offset issue.
  • Produces the transition not terminating
  • The wrap content issues.

Alternative provide sample code showing how you are driving system.
Ideally the code has all hard coded strings and no icons. But it might need icons to demo the bug.

Springs are fundamentally different in that they are non deterministic as to when they end but they should end.

@kroegerama
Copy link
Author

kroegerama commented May 25, 2021

@AlexSuvorov2k
Copy link

How i can increate touch move speed like on screen-20210525-001854.2.mp4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants