Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

recyclerview with OnSwipe left / right event in MotionLayout is not working #417

@loki-cupist

Description

@loki-cupist

Hello. i am using MotionLayout for changing showing layout by swiping.
like this

// xml

<androidx.constraintlayout.motion.widget.MotionLayout
        android:id="@+id/motionLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#000000"
        app:layoutDescription="@xml/xxx_scene">

            <LinearLayout
                        android:id="@+id/layoutList"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="vertical">

                        <androidx.recyclerview.widget.RecyclerView
                            android:id="@+id/recyclerView"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:background="@color/black"
                            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

            </LinearLayout>

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

// xxx_scene

 <Transition
        motion:constraintSetEnd="@id/screen_a"
        motion:constraintSetStart="@id/screen_b"
        motion:duration="300">

        <OnSwipe
            app:dragDirection="dragLeft"
            app:limitBoundsTo="@id/layoutList"
            app:touchRegionId="@id/layoutList"/>
 
</Transition>

However, currently, only the scroll of the recyclerview is working, and dragLeft is not working.
How to use the left and right swipe motions when using RecyclerView within motionlayout?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions