RecyclerView does not roll fast

I have a RecyclerView that only rolls with the finger stuck on the screen, if I make that quick move, to roll enough items, it only rolls while the finger is on the screen, and then stops. He redone it all, and the problem continues.

XML:

 <android.support.v7.widget.RecyclerView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/recyclerViewOf"
    android:scrollbars="horizontal"
    android:clipToPadding="true"
    android:clipChildren="true" />

Java:

RecyclerView.LayoutManager lnm = new GridLayoutManager(getBaseContext(),2);
recyclerView.setLayoutManager(lnm);
OfAdapter adapter = new OfAdapter(getBaseContext(),mList);
adapter.salvaContext(MainActivity.this);
recyclerView.setAdapter(adapter);

I have other RecyclerView in the same app that are rolling normal.

Author: Vinicius Brasil, 2017-02-06

2 answers

I managed to mitigate this problem this way:

recycler_view.setNestedScrollingEnabled(false);
 0
Author: Jhonatan Sabadi, 2017-02-08 01:23:57

I solved my problem as follows, was using collapsing and my RecyclerView, was inside a <include>.

I put the RecyclerView inside a Frame:

<FrameLayout
    android:id="@+id/main.framelayout.title"
    android:layout_width="match_parent"
    android:layout_height="500dp"
    android:layout_gravity="bottom|center_horizontal"
    android:orientation="vertical">...//resto do codigo

Putting the layout_height with a standard size as in the example: 500dp, it does the scrolling as I wanted, the smaller the layout_height the faster the scrolling is.

If I put wrap or match works the scroll, but continues the problem as it was initially, I do not know why, but so is solved my problem.

 0
Author: Techio, 2017-02-08 01:32:59