AssociateWithGlanceWearWidget

@Target(allowedTargets = [AnnotationTarget.CLASS])
@Retention(value = AnnotationRetention.RUNTIME)
annotation AssociateWithGlanceWearWidget


Annotation used to associate a GlanceWearWidget class with its corresponding GlanceWearWidgetService.

This association must be used in GlanceWearWidgetService to specify which associated widget class it has in its widget property. It must match the exact class name of the widget class used in the property.

If this is not specified, correct results of some methods in GlanceWearWidgetManager are not guaranteed.

For example:

@AssociateWithGlanceWearWidget(MyGlanceWearWidget::class)
class MyGlanceWearWidgetService : GlanceWearWidgetService() {
override val widget = MyGlanceWearWidget()
}

Summary

Public constructors

Public properties

KClass<GlanceWearWidget>

Public constructors

AssociateWithGlanceWearWidget

Added in 1.0.0-alpha12
AssociateWithGlanceWearWidget(value: KClass<GlanceWearWidget>)

Public properties

value

val valueKClass<GlanceWearWidget>