<android.support.v4.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:layout_marginTop="15dp"
android:background="#e7e7e8"
android:orientation="vertical"
tools:ignore="RtlHardcoded">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/communication_recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/vision_recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/hearing_recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/physical_dependency_recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/selef_care_recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
This is my code i have take 6 RecyclerView inside NestedScrollView but when i scroll vertically smooth scrolling is not working can any one please suggest me how to apply smooth scrolling in NestedScrollView
Adding recyclerviews
inside NestedScrollView
does not make good practice. Avoid these kind of situation if possible.
Here are some alternatives...
recyclerview
items - Kind of multiple type
recyclerview
recyclerview
to show
content well.If you are using RecyclerView inside NestedScrollView then use mRecyclerView.setNestedScrollingEnabled(false);
If in case it does not work smoothly scrolling for RecyclerView inside NestedScrollView OR Only NestedScrollView then make sure that your compileSdkVersion match with your currently used library version.
For example. In your all build.gradle file compileSdkVersion
25 buildToolsVersion '25.0.3'
Then your support appcompact library version
compile "com.android.support:appcompat-v7:25.3.1"
if you can't find your mismatch library version then run below command in Android Studio Terminal. it should fetch currently used library version and latest library version according compileSdkVersion.
./gradlew -q dependencies app:dependencies --configuration compile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With