Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android MotionLayout+;Recyclerview,Recyclerview中的视图不可单击_Android_Animation_Android Recyclerview_Android Motionlayout - Fatal编程技术网

Android MotionLayout+;Recyclerview,Recyclerview中的视图不可单击

Android MotionLayout+;Recyclerview,Recyclerview中的视图不可单击,android,animation,android-recyclerview,android-motionlayout,Android,Animation,Android Recyclerview,Android Motionlayout,我正在用MotionLayout播放一个RecyclerView,其中.xml中的结构如下 <ConstraintLayout> <MotionLayout> <OtherView...> <RecylerView> </RecylerView> </MotionLayout> </ConstraintLayout> MotionL

我正在用MotionLayout播放一个RecyclerView,其中.xml中的结构如下

<ConstraintLayout>

    <MotionLayout>

        <OtherView...>

        <RecylerView>

        </RecylerView>

    </MotionLayout>

</ConstraintLayout>

MotionLayout的一种行为是,在上下拖动MotionLayout时,RecyclerView将跟随其上下缩放到顶部

一切正常,除了从RecyclerView快速滚动后几秒钟内无法单击RecyclerView中的视图。我认为这可能是由于一些渲染问题,因为每次上下滚动时,RecyclerView中视图的位置也会被替换。 我使用的MotionLayout版本是2.0.1

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

    <!-- 1 -->
    <Transition
        app:constraintSetEnd="@id/end"
        app:constraintSetStart="@id/start"
        app:duration="1000">

        <OnSwipe
            app:dragDirection="dragUp"
            app:touchAnchorId="@+id/rvContent"
            app:touchAnchorSide="top" />

    </Transition>

    <!-- 2 -->
    <ConstraintSet android:id="@+id/start">
        <Constraint android:id="@id/txtTitle">
            <PropertySet app:alpha="1" />
        </Constraint>
        <Constraint android:id="@id/txtSubtitle">
            <PropertySet app:alpha="1" />
        </Constraint>
    </ConstraintSet>

    <Some Other ConstraintSet...>

</MotionLayout>


谁能给我一些解决办法吗?谢谢。

好的,我已经修复了这个错误。该缺陷来自recyclerview和MotionLayout之间的兼容性。只需将您的recyclerview版本设置为最新版本即可