Appbar scrolling in Android design library 22.2.1 vs 22.2.0

I have a problem with the scrolling scrolling of an application in the new android design library. Besides the design library, I am using support libraries 22.2.1 (AppCompat, Recycler view ...).

I have a toolbar with

app:layout_scrollFlags="scroll|enterAlways"

      

and ViewPager:

<android.support.v4.view.ViewPager
    android:id="@+id/viewPager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" />

      

with two tabs. Tab 1 contains Recyclerview1. Tab2 contains LinearLayout with 2 Recyclers view (Recyclerview2 and Recyclerview3) and other views.

When I use com.android.support:design:22.2.0 everything works fine, that is, when scrolling vertically in Recyclerview1, Recyclerview2 or Recyclerview3, the panel scrolls automatically.

So the fact that Recyclerview2 and Recyclerview3 are nested within tab2 and not their direct siblings from tab2 do not affect the scrolling behavior of the toolbar. That's what I need.

Unfortunately, the new release of the com.android.support:design:22.2.1 library breaks this behavior. In version 22.2.1 only Recyclerview1 does the scrolling of the toolbar. The nested Recyclerview2 and Recyclerview3 no longer execute.

What is this lib supposed to do exactly in this case? Is this a new bug in 22.2.1, or is 22.2.0 a bug fixed in 22.2.1?

(Note that I also tried to put all tab2 views in a NestedScrollView, but changed the height of tab2 to 50 or 60 dp. So I gave up.)

+3


source to share


1 answer


Google answered me with the following:

"Are RecyclerView 2 and 3 big enough for scrolling? V22.2.1 will no longer scroll." Views don't need to scroll. " (Project # 1 chrisba ... @ google.com)



Indeed, RecyclerView 2 was not large enough, which explained the problem, but RecyclerView 3 was large enough. However, since then, for some reason (maybe update 22.1.1) my RecyclerView 3 now works as expected.

So just remember that in 22.1.1 (not documented if I'm not mistaken) there is a design intent modification that "won't scroll" Views that don't need to scroll.

0


source







All Articles