android / codelab-constraint-layout

Constraint Layout Codelab
https://codelabs.developers.google.com/codelabs/constraint-layout/
Apache License 2.0
471 stars 242 forks source link

2.0.0-beta6 layout with Paging library behaves wrong #86

Open devleksandr opened 4 years ago

devleksandr commented 4 years ago

I set Paging Library with recyclerView which is inside in constraint layout. Paging config loads pages with 5 items at once and that was only initial load and one load range if user doesn't scroll list. Otherwise with library version 2.0.0-beta6 loadRange method calls all the time while remote data is exist. And there's wrong behavior. Layout looks like this:

<androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/newConstraintLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

<com.google.android.material.appbar.AppBarLayout
*attributes
/>

<androidx.recyclerview.widget.RecyclerView
            android:id="@+id/someId"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintTop_toBottomOf="@id/appBarLayout"
            app:layout_constraintBottom_toTopOf="@id/bottomNavigation" />

 <com.google.android.material.bottomnavigation.BottomNavigationView
*attributes
/>

</androidx.constraintlayout.widget.ConstraintLayout>

With library v1.1.3 Paging works fine