如何解决不要在 Motion Layout 的可点击子项上滑动
我将 MotionLayout 作为布局的父 ViewGroup。作为孩子,它有 CardView,其中包含一些 Button 视图。当我开始在按钮上滑动时,它不起作用,当我开始在背景上滑动时,它起作用了。
<Transition
motion:constraintSetEnd="@+id/top"
motion:constraintSetStart="@+id/start"
motion:motionInterpolator="easeIn">
<OnSwipe
motion:dragDirection="dragUp"
motion:touchRegionId="@id/fn_card" />
</Transition>
<androidx.cardview.widget.CardView
android:id="@+id/fn_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="26dp"
app:layout_constraintTop_toBottomOf="@id/fn_guideline_middle">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/fn_card_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#DA9E06" />
<Button
android:id="@+id/fn_button_t"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_margin="26dp"
android:backgroundTint="#2B2B2B"
android:text="Button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
有人知道怎么解决吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。