I am using NestedScrollView in tab layout and when I implemented RecyclerView in NestedScrollView 2 problems occur:
- Toolbar is not hiding.
- RecyclerView in not scrolling smoothly.
Here is my Code:
<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:fillViewport="true" xmlns:android="http://schemas.android.com/apk/res/android"> <RelativeLayout android:layout_width="match_parent" android:background="#fff" android:layout_height="wrap_content"> <android.support.v7.widget.RecyclerView android:layout_below="@+id/toolbar" android:id="@+id/recyclerView" android:background="#fafafa" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" /> <ProgressBar android:id="@+id/progressBar1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" /> </RelativeLayout> </android.support.v4.widget.NestedScrollView>