I have the following layout:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v4.widget.NestedScrollView
android:id="@+id/nestedscrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/inner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<NESTED VIEWS>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<LinearLayout
android:id="@+id/outer_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<OUTER VIEWS>
</LinearLayout>
</LinearLayout>
</ScrollView>
My question is that I want the ScrollView to scroll first, if at all the ScrollView has moved the slightest of bit, else the NestedScrollView can consume the touch. Currently, the NestedScrollView gets the touch events and consumes the scroll only after which does the ScrollView receive the touch. I've tried using onInterceptTouchEvent and experimented with it, but to no avail. Any pointers?
Is this the right approach or do I use some other view combination? (Coordinator layout maybe?)