# Carousel

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/carousel/Carousel.java)

*** ** * ** ***


```
public interface Carousel
```

<br />

Known direct subclasses [CarouselLayoutManager](https://developer.android.com/reference/com/google/android/material/carousel/CarouselLayoutManager)

|---|---|
| `https://developer.android.com/reference/com/google/android/material/carousel/CarouselLayoutManager` | A LayoutManager that can mask and offset items along the scrolling axis, creating a unique list optimized for a stylized viewing experience. |

*** ** * ** ***

An interface that defines a widget that can be configured as a Carousel.

## Summary

| ### Public methods |
|---|---|
| `abstract int` | `https://developer.android.com/reference/com/google/android/material/carousel/Carousel#getCarouselAlignment()()` Gets the alignment of the carousel. |
| `abstract int` | `https://developer.android.com/reference/com/google/android/material/carousel/Carousel#getContainerHeight()()` Gets the height of the carousel container. |
| `abstract int` | `https://developer.android.com/reference/com/google/android/material/carousel/Carousel#getContainerWidth()()` Gets the width of the carousel container. |
| `abstract int` | `https://developer.android.com/reference/com/google/android/material/carousel/Carousel#getItemCount()()` Gets the number of items in the carousel. |
| `abstract boolean` | `https://developer.android.com/reference/com/google/android/material/carousel/Carousel#isHorizontal()()` Whether or not the orientation is horizontal. |

## Public methods

### getCarouselAlignment

```
abstract int getCarouselAlignment()
```

Gets the alignment of the carousel.

### getContainerHeight

```
abstract int getContainerHeight()
```

Gets the height of the carousel container.

### getContainerWidth

```
abstract int getContainerWidth()
```

Gets the width of the carousel container.

### getItemCount

```
abstract int getItemCount()
```

Gets the number of items in the carousel.

### isHorizontal

```
abstract boolean isHorizontal()
```

Whether or not the orientation is horizontal.