Skip to content


[Carousel][Docs] Adding docs for fullscreen carousel strategy
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 546350583
  • Loading branch information
imhappi authored and paulfthomas committed Jul 11, 2023
1 parent c15a323 commit 7c40359
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/components/
Expand Up @@ -144,6 +144,30 @@ SnapHelper snapHelper = new CarouselSnapHelper();

## Fullscreen strategy

![A contained, fullscreen Carousel](assets/carousel/fullscreen.png)

A fullscreen strategy shows one item at a time that takes up the entire space
of the carousel.

You can use the fullscreen strategy by passing in the strategy to the
CarouselLayoutManager constructor: `new CarouselLayoutManager(new

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)`

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

SnapHelper snapHelper = new CarouselSnapHelper();

## Customizing carousel

### Item size
Expand Down
Binary file added docs/components/assets/carousel/fullscreen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c40359

Please sign in to comment.