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

Motionlayout contain recyclerView, to update recycleview during animation,after animation recycleview not updated #230

Open
1352101891 opened this issue Sep 15, 2021 · 0 comments

Comments

@1352101891
Copy link

1352101891 commented Sep 15, 2021

Motionlayout contain recyclerView, to update recycleview during animation,after animation recycleview not updated。

`<androidx.constraintlayout.motion.widget.MotionLayout
android:id="@+id/motionLayout"
app:layoutDescription="@xml/scene3"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:showPaths="true">

    <RelativeLayout
        android:id="@+id/testId"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="parent"
        app:layout_constraintVertical_chainStyle="spread">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_media_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="10dp"/>

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/media_send_fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:layout_margin="16dp"
            android:onClick="sendTheMessages"
            app:fabSize="normal" />
    </RelativeLayout>
</androidx.constraintlayout.motion.widget.MotionLayout>`

motionLayout.translateToEnd(); adapter.updateitem(0,size);

it does't not work,RecyclerView not update. but after animation , to do updateitem it's work;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant