constraintlayout icon indicating copy to clipboard operation
constraintlayout copied to clipboard

The issue of OnSwipe action with a recylcerview

Open pokk opened this issue 4 years ago • 5 comments

Thank you so much for providing and helping us through this good component.

Don't know this is fine for raising an issue with videos. If the information is not enough please let me know.

Just updated my constraint layout version to 2.1.0-beta02 but my recyclerview doesn't work with other components. The behavior on version 2.1.0-beta01 with a recyclerview was what I excepted.

https://user-images.githubusercontent.com/5198104/117118634-f8426800-adcb-11eb-82fe-631cc58bd837.mov

But 2.1.0-beta02 is

https://user-images.githubusercontent.com/5198104/117118744-1f009e80-adcc-11eb-9f35-4f25b751b535.mov

Just wondering this change is correct or I should change it on my side.

pokk avatar May 05 '21 09:05 pokk

Post the transition you are using (including the OnSwipe) (What you posted so far is fine. )

jafu888 avatar May 05 '21 21:05 jafu888

This is my motion scence

<MotionScene
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <Transition
        android:id="@+id/transition_search_scene"
        app:constraintSetEnd="@id/collapsed"
        app:constraintSetStart="@id/expanded"
        app:duration="150">
        <KeyFrameSet>
            <KeyAttribute
                app:framePosition="50"
                app:motionTarget="@id/sov_backdrop">
                <CustomAttribute
                    app:attributeName="topLeftRadiusDp"
                    app:customFloatValue="0"/>
                <CustomAttribute
                    app:attributeName="topRightRadiusDp"
                    app:customFloatValue="0"/>
            </KeyAttribute>
        </KeyFrameSet>
        <OnSwipe
            app:dragDirection="dragUp"
            app:touchAnchorId="@id/rv_musics"/>
    </Transition>

    <ConstraintSet android:id="@+id/expanded">
		...
    </ConstraintSet>

    <ConstraintSet android:id="@+id/collapsed">
		...
    </ConstraintSet>
</MotionScene>

pokk avatar May 06 '21 03:05 pokk

Does drag up move -> expand or collapse ? Try switching expand or collapse.

jafu888 avatar May 06 '21 17:05 jafu888

The next release will revert the offending change an put it behind a flag

jafu888 avatar May 06 '21 20:05 jafu888

@jafu888 So sorry for the late reply.

Does drag up move -> expand or collapse ? Try switching expand or collapse.

I have tried this XD But it does a wrong behavior of my expected.

Thank you so much for the help. 🙇

pokk avatar May 08 '21 07:05 pokk