Skip to content

Commit

Permalink
[Carousel][Docs] Recommend snapping for multi-browse strategy
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 588114790
  • Loading branch information
imhappi authored and raajkumars committed Dec 5, 2023
1 parent 95e1c44 commit 9e64a1f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/components/Carousel.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ container.
You can use the multi-browse strategy by passing in no arguments to the
CarouselLayoutManager constructor: `CarouselLayoutManager()`.

With the multi-browse strategy, it is recommended to use the `CarouselSnapHelper` to snap to the nearest item like so:

```kt
val snapHelper = CarouselSnapHelper()
snapHelper.attachToRecyclerView(carouselRecyclerView)
```

## Hero strategy

![A contained, hero Carousel](assets/carousel/hero.png)
Expand Down

0 comments on commit 9e64a1f

Please sign in to comment.