> Documentation index: https://developer.android.com/reference/llms.txt

# ContainerInfo

Artifact: [androidx.glance.wear:wear-core](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/glance/wear/core/WearWidgetProviderInfo.kt+class:androidx.glance.wear.core.ContainerInfo) Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)


```
class ContainerInfo
```

<br />

*** ** * ** ***

Describes a container supported by a widget provider.

A container is one representation of a widget, with a given size and shape.

The fields in this class correspond to the fields in the `<container>` xml tag.

For example:

```kotlin
<container
    android:type="@integer/glance_wear_container_type_large"
    android:previewImage="@drawable/large_preview"
    android:label="@string/large_label" />
```

## Summary

| ### Constants |
|---|---|
| `const Int` | `CONTAINER_TYPE_LARGE` Represents a large widget container. |
| `const Int` | `CONTAINER_TYPE_SMALL` Represents a small widget container. |
| `const Int` | `CONTAINER_TYPE_TILE_COMPAT` Represents a container equivalent to a Wear Tile. |

| ### Public functions |
|---|---|
| `open operator Boolean` | `equals(other: Any?)` |
| `open Int` | `hashCode()` |

| ### Public properties |
|---|---|
| `String?` | `description` The override description for this widget container. |
| `String?` | `label` The override label for this widget container. |
| `@DrawableRes Int` | `previewImage` The resource id of the preview image for this widget container. |
| `Int` | `type` The type of this widget container. |

## Constants

### CONTAINER_TYPE_LARGE

```
const val CONTAINER_TYPE_LARGE: Int
```

Represents a large widget container. Support for this container type is device dependent.

### CONTAINER_TYPE_SMALL

```
const val CONTAINER_TYPE_SMALL: Int
```

Represents a small widget container. Support for this container type is device dependent.

### CONTAINER_TYPE_TILE_COMPAT

```
const val CONTAINER_TYPE_TILE_COMPAT: Int
```

Represents a container equivalent to a Wear Tile. This widget is embedded inside a Tile container, and its contents are restricted to specs similar to `CONTAINER_TYPE_LARGE`

For this container type, the host shows the widget label above the contents (and may also show icon).

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### description

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val description: String?
```

The override description for this widget container.

### label

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val label: String?
```

The override label for this widget container.

### previewImage

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val previewImage: @DrawableRes Int
```

The resource id of the preview image for this widget container.

### type

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val type: Int
```

The type of this widget container. This can be one of `ContainerInfo.CONTAINER_TYPE_LARGE` or `ContainerInfo.CONTAINER_TYPE_SMALL`.

Value is one of the following:

- `0`
- `1`
- `2`

<br />