ContainerInfo

class ContainerInfo


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:

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

Summary

Constants

const Int

Represents a fullscreen widget container, equivalent to a Wear Tile.

const Int

Represents a large widget container.

const Int

Represents a small widget container.

Public functions

open operator Boolean
equals(other: Any?)
open Int

Public properties

String?

The override description for this widget container.

String?

The override label for this widget container.

Int

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

Int

The type of this widget container.

Constants

CONTAINER_TYPE_FULLSCREEN

const val CONTAINER_TYPE_FULLSCREEN = 0: Int

Represents a fullscreen widget container, equivalent to a Wear Tile.

CONTAINER_TYPE_LARGE

const val CONTAINER_TYPE_LARGE = 1: Int

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

CONTAINER_TYPE_SMALL

const val CONTAINER_TYPE_SMALL = 2: Int

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

Public functions

equals

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

hashCode

open fun hashCode(): Int

Public properties

description

Added in 1.0.0-alpha01
val descriptionString?

The override description for this widget container.

label

Added in 1.0.0-alpha01
val labelString?

The override label for this widget container.

previewImage

Added in 1.0.0-alpha01
val previewImageInt

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

type

Added in 1.0.0-alpha01
val typeInt

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