I have an activity which contains a Nested ScrollView in it. Inside this NestedScrollView there is a ViewPager. Each Page has a view which contains a ScrollView. This innermost scrollview is not scrolling at all. How can I enable the scrolling behaviour in this innermost ScrollView
This is the xml of Activity
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
tools:context=".MainActivity">
<androidx.core.widget.NestedScrollView
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">
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="300dp" />
<ImageView
android:layout_width="400dp"
android:layout_height="400dp"
android:layout_marginTop="10dp"
android:src="@drawable/ic_launcher_background" />
<ImageView
android:layout_width="400dp"
android:layout_height="400dp"
android:layout_marginTop="10dp"
android:src="@drawable/ic_launcher_background" />
<ImageView
android:layout_width="400dp"
android:layout_height="400dp"
android:layout_marginTop="10dp"
android:src="@drawable/ic_launcher_background" />
<ImageView
android:layout_width="400dp"
android:layout_height="400dp"
android:layout_marginTop="10dp"
android:src="@drawable/ic_launcher_background" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
This is xml of view pager
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:orientation="vertical">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="800dp" />
</androidx.core.widget.NestedScrollView>