diff --git a/docs/components/Carousel.md b/docs/components/Carousel.md index 01c43ea401c..929be34cf9b 100644 --- a/docs/components/Carousel.md +++ b/docs/components/Carousel.md @@ -144,6 +144,30 @@ SnapHelper snapHelper = new CarouselSnapHelper(); snapHelper.attachToRecyclerView(carouselRecyclerView); ``` +## 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 +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)` + +It is also recommended to use the `CarouselSnapHelper` +to snap to the nearest item like so: + +``` +SnapHelper snapHelper = new CarouselSnapHelper(); +snapHelper.attachToRecyclerView(carouselRecyclerView); +``` + ## Customizing carousel ### Item size diff --git a/docs/components/assets/carousel/fullscreen.png b/docs/components/assets/carousel/fullscreen.png new file mode 100644 index 00000000000..5863ea45f5b Binary files /dev/null and b/docs/components/assets/carousel/fullscreen.png differ