Skip to content

Commit

Permalink
[Docs][Carousel] Add guidance in fullscreen strategy docs about portr…
Browse files Browse the repository at this point in the history
…ait orientation

PiperOrigin-RevId: 563087886
  • Loading branch information
imhappi authored and leticiarossi committed Sep 6, 2023
1 parent 9a4888f commit caec8d2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/components/Carousel.md
Expand Up @@ -164,7 +164,17 @@ FullScreenStrategy())`.
With the fullscreen strategy, it is recommended to use a vertical orientation
carousel by either setting the orientation on the CarouselLayoutManager with the
setter, or through its constructor: `new CarouselLayoutManager(new
FullScreenCarouselStrategy(), RecyclerView.VERTICAL)`
FullScreenCarouselStrategy(), RecyclerView.VERTICAL)`. Stick to portrait
orientation only, or adapt your layout to a different strategy when using
landscape in order to maintain the aspect ratios of your images.

It is also recommended to use the `CarouselSnapHelper`
to snap to the nearest item like so:

```
SnapHelper snapHelper = new CarouselSnapHelper();
snapHelper.attachToRecyclerView(carouselRecyclerView);
```

It is also recommended to use the `CarouselSnapHelper`
to snap to the nearest item like so:
Expand Down

0 comments on commit caec8d2

Please sign in to comment.