-4

I have 7 horizontal recyclerview in fragment in nested scroller the problem when I scroll the hole page or the recycler view the interface stop 1 second I see NetFlix the film and program recycler is very fast but in my app the recycler not take from first touch Note: my app is very similar to NetFlix

 <android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="80dp"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingEnd="16dp"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:paddingStart="16dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="4dp"
                    android:orientation="horizontal">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight=".5"
                        android:fontFamily="@font/kufi_bold_0"
                        android:singleLine="true"
                        android:text="@string/category"
                        android:textColor="@color/white"
                        android:textSize="16sp" />

                </LinearLayout>

                <android.support.v7.widget.RecyclerView
                    android:id="@+id/categoryRecycler"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:fastScrollEnabled="true"
                    app:fastScrollHorizontalThumbDrawable="@drawable/fast_scroll_thumb"
                    app:fastScrollHorizontalTrackDrawable="@drawable/fast_scroll_track"
                    app:fastScrollVerticalThumbDrawable="@drawable/fast_scroll_thumb"
                    app:fastScrollVerticalTrackDrawable="@drawable/fast_scroll_track"
                    android:nestedScrollingEnabled="false">

                </android.support.v7.widget.RecyclerView>

            </LinearLayout>

2 Answers2

0

I hope this might be help you.

For Kotlin

recyclerView!!.isNestedScrollingEnabled = false

For Java

recyclerView.setNestedScrollingEnabled(false);
Sanjay Mangaroliya
  • 4,286
  • 2
  • 29
  • 33
0

In the xml layout file you can set

android:nestedScrollingEnabled="false"

by the RecyclerView attribute

Hop this helps

OhDigiT
  • 61
  • 5