I just want my nested scrollview to scroll, I do not want the lists to scroll. For some reason the scrollview does not scroll. I looked into multiple posts related to nested scroll views, scroll views, with listview, none of the solution helped. It is strange that the scrollview is not working, I am not certain if I am missing something. Also, my listviews are of dynamic heights.
Here is my code:
<android.support.v4.widget.NestedScrollView
android:id="@+id/ns_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/grey"
android:orientation="vertical">
<TextView
style="@style/customFontStyleBook"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:padding="5dp"
android:text="Heading 1"
android:textColor="#000"
android:textStyle="bold"/>
<ListView
android:id="@+id/ll1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/grey"
android:orientation="vertical">
<TextView
style="@style/customFontStyleBook"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:padding="5dp"
android:text="Heading 2"
android:textColor="#000"
android:textStyle="bold"/>
<ListView
android:id="@+id/ll2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/grey"
android:orientation="vertical">
<TextView
style="@style/customFontStyleBook"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:padding="5dp"
android:text="Heading 3"
android:textStyle="bold"
android:textColor="#000" />
<ListView
android:id="@+id/ll3"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>