0
如何將GestureOverlayView
放在我的CoordinatorLayout中NestedScrollView
? ,因爲我的問題是,如果我畫在gestureOverlay
滾動偶頁,手勢是不可用的。CoordinatorLayout中的GestureOverlayView滾動和NestedScrollView
我activity.xml
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/scrollViewreceipt"
tools:context=".activities.activity">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/activityRecicler"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginTop="15dp"
app:stackFromEnd="true" />
<android.gesture.GestureOverlayView
android:id="@+id/signaturePad"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="5"
android:background="#d3d3d3"
android:eventsInterceptionEnabled="true"
android:fadeEnabled="false"
android:gestureColor="#333"
android:gestureStrokeLengthThreshold="0.1"
android:gestureStrokeType="multiple"
android:fadeOffset="5000"
android:orientation="vertical">
</android.gesture.GestureOverlayView>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="testImage"
android:text="testami"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:backgroundTint="#b2d33f"
android:src="@drawable/ic_save_black_36dp"
android:onClick="saveReceipt" />
</android.support.design.widget.CoordinatorLayout>
如果我在垂直繪製GestureOverlayView整個頁面滾動和停止平局。