# Shape

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/model/Shape.java+class:androidx.car.app.model.Shape) Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

*** ** * ** ***


```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
@CarProtocol
public final class Shape
```

<br />

*** ** * ** ***

A primitive defining container shapes.

## Summary

| ### Constants |
|---|---|
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape` | `https://developer.android.com/reference/androidx/car/app/model/Shape#CORNER_EXTRA_LARGE()` An extra large cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape` | `https://developer.android.com/reference/androidx/car/app/model/Shape#CORNER_EXTRA_SMALL()` An extra small cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape` | `https://developer.android.com/reference/androidx/car/app/model/Shape#CORNER_FULL()` A fully cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape` | `https://developer.android.com/reference/androidx/car/app/model/Shape#CORNER_LARGE()` A large cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape` | `https://developer.android.com/reference/androidx/car/app/model/Shape#CORNER_MEDIUM()` A medium cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape` | `https://developer.android.com/reference/androidx/car/app/model/Shape#CORNER_SMALL()` A small cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape` | `https://developer.android.com/reference/androidx/car/app/model/Shape#NONE()` A `https://developer.android.com/reference/androidx/car/app/model/Shape` instance with no rounding. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#TYPE_CORNER_EXTRA_LARGE() = 6` An extra large corner shape. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#TYPE_CORNER_EXTRA_SMALL() = 2` An extra small corner shape. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#TYPE_CORNER_FULL() = 7` A full corner (pill/circle) shape. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#TYPE_CORNER_LARGE() = 5` A large corner shape. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#TYPE_CORNER_MEDIUM() = 4` A medium corner shape. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#TYPE_CORNER_SMALL() = 3` A small corner shape. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#TYPE_NONE() = 1` Represents a rectangular shape with sharp corners |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/Shape#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#getShapeType()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/Shape.ShapeType` of the shape. |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/Shape#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/car/app/model/Shape#toString()()` |

## Constants

### CORNER_EXTRA_LARGE

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final @NonNull Shape CORNER_EXTRA_LARGE
```

An extra large cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance.

### CORNER_EXTRA_SMALL

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final @NonNull Shape CORNER_EXTRA_SMALL
```

An extra small cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance.

### CORNER_FULL

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final @NonNull Shape CORNER_FULL
```

A fully cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance.

### CORNER_LARGE

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final @NonNull Shape CORNER_LARGE
```

A large cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance.

### CORNER_MEDIUM

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final @NonNull Shape CORNER_MEDIUM
```

A medium cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance.

### CORNER_SMALL

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final @NonNull Shape CORNER_SMALL
```

A small cornered `https://developer.android.com/reference/androidx/car/app/model/Shape` instance.

### NONE

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final @NonNull Shape NONE
```

A `https://developer.android.com/reference/androidx/car/app/model/Shape` instance with no rounding.

### TYPE_CORNER_EXTRA_LARGE

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final int TYPE_CORNER_EXTRA_LARGE = 6
```

An extra large corner shape.

### TYPE_CORNER_EXTRA_SMALL

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final int TYPE_CORNER_EXTRA_SMALL = 2
```

An extra small corner shape.

### TYPE_CORNER_FULL

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final int TYPE_CORNER_FULL = 7
```

A full corner (pill/circle) shape.

### TYPE_CORNER_LARGE

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final int TYPE_CORNER_LARGE = 5
```

A large corner shape.

### TYPE_CORNER_MEDIUM

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final int TYPE_CORNER_MEDIUM = 4
```

A medium corner shape.

### TYPE_CORNER_SMALL

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final int TYPE_CORNER_SMALL = 3
```

A small corner shape.

### TYPE_NONE

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public static final int TYPE_NONE = 1
```

Represents a rectangular shape with sharp corners

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getShapeType

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public int getShapeType()
```

Returns the `https://developer.android.com/reference/androidx/car/app/model/Shape.ShapeType` of the shape.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```