Skip to content

Commit

Permalink
[Carousel] Added a notifyItemSizeChanged() method
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 704836257
  • Loading branch information
imhappi authored and hunterstich committed Dec 16, 2024
1 parent 4019e18 commit 4bc4381
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ private void setCarouselAttributes(Context context, AttributeSet attrs) {
}
}

/**
* Recalculates the internal state of the Carousel based on the size of the items. This should be
* called whenever the size of the items is changed.
*/
public void notifyItemSizeChanged() {
refreshKeylineState();
}

/**
* Sets the alignment of the focal items in the carousel.
*/
Expand Down

0 comments on commit 4bc4381

Please sign in to comment.