i am facing a problem with viewpager2
i have parentViewPager2 with Fragments like FragmentA, FragmentB …
and FragmentA also have ViewPager2 with Fragments like InnerFragment1 InnerFragment2 Nested
it was working fine until migrate to ViewPager2 my problem is that it is working fine but showing grey overlay screen on top ViewPager it disappear while touching on screen
here is My ParentViewPager2 xml
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fragments_bg">
<LinearLayout
android:id="@+id/title_linear"
android:layout_width="match_parent"
android:layout_height="@dimen/edittext_height"
android:background="@color/white"
android:orientation="horizontal"
android:weightSum="4"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/constituents_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3.6"
android:fontFamily="@font/helvetica_new_light"
android:gravity="center|start"
android:paddingLeft="@dimen/_12sdp"
android:textColor="@color/sub_title_color"
android:textSize="14sp"
android:textStyle="bold" />
<View
android:layout_width="1.5dp"
android:layout_height="match_parent"
android:background="@color/fragments_bg"
android:visibility="gone">
</View>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight=".4"
android:background="@color/white">
<RelativeLayout
android:id="@+id/option_relative"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white">
<ImageView
android:id="@+id/options"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/down_arrow_holding"
android:tint="@color/colorPrimary" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="1.5dp"
android:background="@color/fragments_bg"
app:layout_constraintTop_toBottomOf="@+id/title_linear" />
<LinearLayout
android:id="@+id/sub_title_linear_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/edittext_height"
android:background="@color/white"
android:orientation="horizontal"
android:visibility="gone"
android:weightSum="4"
app:layout_constraintTop_toBottomOf="@+id/view1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3.6">
<TextView
android:id="@+id/sub_title_tv"
style="@style/style_semibold_fontsize_14"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3.6"
android:fontFamily="@font/helvetica_light"
android:gravity="center|start"
android:paddingLeft="@dimen/_12sdp"
android:text=""
android:textColor="@color/sub_title_color" />
</LinearLayout>
<View
android:layout_width="1.5dp"
android:layout_height="match_parent"
android:background="@color/fragments_bg" />
<LinearLayout
android:id="@+id/subtext_2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight=".4"
android:background="@color/fragments_bg">
<RelativeLayout
android:id="@+id/create_new_img"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white">
<ImageView
android:id="@+id/filter_imgview"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:src="@drawable/sort_filter"
android:tint="@color/colorPrimary"
android:visibility="visible" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/view2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/fragments_bg"
app:layout_constraintTop_toBottomOf="@+id/sub_title_linear_layout" />
<LinearLayout
android:id="@+id/sub_title_linear_layout_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/view2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/sub_title_tv_2"
style="@style/style_fontsize_14"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:drawableEnd="@drawable/down_arrow_expand"
android:drawablePadding="@dimen/_8sdp"
android:fontFamily="@font/helvetica_light"
android:gravity="center|start"
android:padding="@dimen/_6sdp"
android:text="Performance Year: 2021"
android:textColor="@color/colorPrimary" />
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/view3"
android:layout_width="match_parent"
android:layout_height="1.5dp"
android:background="@color/fragments_bg"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/sub_title_linear_layout_2" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view3">
</androidx.viewpager2.widget.ViewPager2>
<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:indeterminate="true"
android:indeterminateTint="@color/common_dark_gray_color"
android:indeterminateTintMode="src_atop"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
here is my childViewPager2 inside the ParentViewPager2
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:id="@+id/title_linear"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="@dimen/edittext_height"
android:background="@color/white"
android:orientation="horizontal"
android:weightSum="4">
<TextView
android:id="@+id/constituents_title"
android:fontFamily="@font/helvetica_new_light"
android:textSize="14sp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3.6"
android:gravity="center|start"
android:paddingLeft="@dimen/_12sdp"
android:text="@string/lbl_assetbycurrency"
android:textColor="@color/sub_title_color" />
<View
android:layout_width="1.5dp"
android:visibility="gone"
android:layout_height="match_parent"
android:background="@color/fragments_bg">
</View>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight=".4"
android:background="@color/white">
<RelativeLayout
android:id="@+id/option_relative"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white">
<ImageView
android:id="@+id/options"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/down_arrow_holding"
app:tint="@color/colorPrimary" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="1.5dp"
android:layout_below="@+id/title_linear"
android:background="@color/fragments_bg"
/>
<TextView
android:id="@+id/overview_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_margin="10dp"
android:lineSpacingExtra="-3.3sp"
android:padding="10dp"
android:visibility="gone"
android:text="Skip"
android:textColor="#999999"
android:textSize="18sp" />
<com.mydesq.mywealth.utils.NestedScrollableHost
android:id="@+id/viewPager2rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/pager_dots"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_below="@+id/view1">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible">
</androidx.viewpager2.widget.ViewPager2>
</com.mydesq.mywealth.utils.NestedScrollableHost>
<RadioGroup
android:id="@+id/pager_dots"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_alignParentBottom="true"
android:layout_marginTop="12dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal" />