flexbox-layout
flexbox-layout copied to clipboard
LayoutManager: clipToPadding=false is buggy
Is it a known issue that items that aren't fully visible don't show up when they're within the padding area and clipToPadding is set to false with a certain padding amount?
No it's not a known issue. Do you have a code that can reproduce the issue? Thanks in advance.
Sure, I will try sending a sample project to help you reproduce this.
I have the same problem
To reproduce use a RecyclerView. The important part is that you turn off clipToPadding and set a padding at bottom.
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_az_content"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="center_horizontal"
android:layout_marginRight="8dp"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginLeft="8dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintHorizontal_bias="0.0"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/recycler_az"
app:layout_constraintBottom_toBottomOf="parent"
android:clipToPadding="false"
android:paddingBottom="64dp"
android:layout_marginBottom="0dp"/>
Here I set clipToPadding = false and botomPadding of 64dp
The I use
FlexboxLayoutManager flexLayoutManager = new FlexboxLayoutManager(context);
flexLayoutManager.setFlexDirection(FlexDirection.ROW);
recyclerAZcontent.setLayoutManager(flexLayoutManager);
Normally the Recycler should draw its items also in the padding area. The FlexBoxLayoutManager is drawing when the item moves out of padding area. So the effect is that items suddenly appear.
For better understanding i recorded a little video. If you look at the bottom recyclerview, you can see item appearing suddenly when i scroll down, but they keep drawn when recycler is moved up again
Thanks for the video. Looks like this is because FlexboxLayoutManager doesn't support predictive item animations yet (example).
I tried to implement it, but haven't completed it. Let me keep this open for until we implement it.
Any news on this topic?
Any news? Having the same problem.
I have the same problem.
I get a similar problem though at the top when using this in conjunction with a coordinator layout. I have padding atop the RecyclerView, scrolling down is fine but when I return to the top the recycler doesn't redraw any of the top items while they'd be within the padding.
@thagikura I'm not sure I quite understand why this is related to predictive item animations? It would appear it simply isn't actively loading items that would exist within the padding area.
Any news? Having the same problem.
after 2 years, any news ?
I have the same problem, RecyclerView + FlexLayoutManager inside ConstraintLayout and clipToPadding not work at first show. I changed layout_height from 0dp to wrap_content then it works
I have the same problem.