NestedScrollViewの上にRelativeLayoutがあります。私はRelativeLayout上のクリックの伝播を防ぎたいが、すべてのスクロールイベントを許可する。 android:clickable="true"
追加 それはビュー上でクリックイベントとバイパススクロールイベントを回避するにはどうすればよいですか?
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
... content ...
</android.support.v4.widget.NestedScrollView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_anchor="@id/scrollView"
app:layout_anchorGravity="bottom|left|end">
<RelativeLayout
android:id="@+id/controllers_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/activity_vertical_margin"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="@+id/bottom_bar">
... content ...
</RelativeLayout>
... content ...
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
「controllers_container」IDとRelativeLayoutに適用すべきは、スクロールを含む任意のタッチイベントを、防止します。私はscrollViewにタッチリスナーを設定しようとしましたが、望みどおりに管理できませんでした。何か案は?
親イベントへのタッチイベントを排除して、onTouchIntercept – Vicky