Skip to content

Commit 52228c1

Browse files
imhappikendrickumstattd
authored andcommitted
[Carousel] Update keyline state if necessary if item size changes
PiperOrigin-RevId: 719390625
1 parent 916e908 commit 52228c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/java/com/google/android/material/carousel/CarouselLayoutManager.java

+6
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,12 @@ public void onItemsRemoved(@NonNull RecyclerView recyclerView, int positionStart
16421642
updateItemCount();
16431643
}
16441644

1645+
@Override
1646+
public void onItemsChanged(@NonNull RecyclerView recyclerView) {
1647+
super.onItemsChanged(recyclerView);
1648+
updateItemCount();
1649+
}
1650+
16451651
private void updateItemCount() {
16461652
int newItemCount = getItemCount();
16471653

0 commit comments

Comments
 (0)