views-widgets-samples icon indicating copy to clipboard operation
views-widgets-samples copied to clipboard

ViewPager2 horizontal scrolling conflict with the WebView child

Open imrankst1221 opened this issue 3 years ago • 3 comments

MainActivity

 <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                android:layout_below="@+id/layout_toolbar">
                <com.google.android.material.tabs.TabLayout
                    android:id="@+id/tab_layout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="top"
                    app:tabMode="scrollable" />
                <androidx.viewpager2.widget.ViewPager2
                    android:id="@+id/view_pager"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:nestedScrollingEnabled="false" />
            </LinearLayout>

Fragment

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context="infix.imrankst1221.webapp.ui.home.WebViewFragment">
    <WebView
        android:id="@+id/web_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:windowSoftInputMode="adjustResize"/>
</FrameLayout>

imrankst1221 avatar Jul 14 '20 05:07 imrankst1221