I have got a web view inside a NestedScrollView due to some animation and transition that I want in my layout. Now the thing is the vertical scroll is working perfectly fine (which I guess is due to the scroll of nested scroll view and not the web view), but the horizontal scroll is smooth. Horizontal scroll as in the horizontal scroll of the content inside the webview (say a carousel inside a webview).
Here's my layout:-
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.SearchView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="@color/white"
app:layout_scrollFlags="scroll|enterAlways" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/activity_main_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.core.widget.NestedScrollView
android:id="@+id/nested_scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<WebView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<fr.castorflex.android.smoothprogressbar.SmoothProgressBar
android:id="@+id/progress_bar"
android:layout_width="match_parent"
android:layout_height="3.5dp"
android:indeterminate="true"
app:layout_constraintTop_toTopOf="parent"
app:spb_color="#FB9043"
app:spb_mirror_mode="false"
app:spb_reversed="false"
android:layout_marginTop="60dp"
app:spb_sections_count="5"
app:spb_speed="1.0"
app:spb_stroke_separator_length="4.0dp"
app:spb_stroke_width="4.0dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
Can anyone help me with this?