Skip to content

Commit

Permalink
[Carousel] Fix issue with not refreshing keylines
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 547956870
  • Loading branch information
imhappi authored and paulfthomas committed Jul 17, 2023
1 parent 3b0fd58 commit 674ec44
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -176,6 +176,14 @@ public void setCarouselStrategy(@NonNull CarouselStrategy carouselStrategy) {
refreshKeylineState();
}

@Override
public void onAttachedToWindow(RecyclerView view) {
super.onAttachedToWindow(view);
// TODO: b/291123558 - Keylines should be also be refreshed when
// there's any change affecting dimens of the RecyclerView.
refreshKeylineState();
}

@Override
public void onLayoutChildren(Recycler recycler, State state) {
if (state.getItemCount() <= 0) {
Expand Down

0 comments on commit 674ec44

Please sign in to comment.