1

I have a very similar issue just as this. NestedScrollView and Horizontal RecyclerView Smooth Scrolling

Vertical NestedScrollView (app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
| - Vertical LinearLayout
    |
    | - Vertical LinearLayout
        | - TextView (Title)
        | - Horizontal RecyclerView
    |
    | - Vertical LinearLayout
        | - TextView (Title)
        | - Horizontal RecyclerView
    |
    | - Vertical RecyclerView

The Vertical NestedScrollView and the Vertical RecyclerView are just alright, but the two Horizontal RecyclerView scrollers are just horrible. None of the components are custom, and everything come from recyclerview-v7:24.2.1, support-v4:24.2.1, design:24.2.1.

I even tried using the leanback-v17:24.2.1, but no avail.

The Horizontal RecyclerViews are setup with LinearLayoutManager.HORIZONTAL. I have tried everything from declaratively (android:nestedScrollingEnabled) and programmatically (setNestedScrollingEnabled) setting to true or false, LayoutFrozen, ScrollingTouchSlop, ItemViewCacheSize, but nothing seems to improve the horizontal scroll experience.

What properties, attributes may be used on the Horizontal RecyclerViews so that the horizontal scrolling is smooth as butter?

minSDKVersion 19, targetSDKVersion 24, compileSDKVersion 24, buildToolsVersion 24.0.2.

Community
  • 1
  • 1
AndroidRocks
  • 292
  • 4
  • 16

2 Answers2

0

Horizontal RecyclerView Scrolling in Vertical NestedScrollView sucks. I had to replace Horizontal RecyclerView with a HorizontalScrollView, put a Horizontal LinearLayout inside that as a the top-level child, and populate the limited known size of Child-views programmatically, to achieve the desired smooth scrolling. If the Child-views were dynamic in size, I wouldn't have been able to solve this, I guess.

AndroidRocks
  • 292
  • 4
  • 16
-1

Try to use old ListView instead Recyclerview, and disable touch if you have pager.

  • Horizontal RecyclerViews are used to present individual CardViews. Old ListView with ViewHolder pattern, and CardViews, I have never tried that before. – AndroidRocks Sep 16 '16 at 18:42