Stay organized with collections Save and categorize content based on your preferences.

ProtoLayoutComplicationData

@ComplicationExperimental
public final class ProtoLayoutComplicationData extends ComplicationData


A complication that contains a serialized protoLayout.

Summary

Nested types

public final class ProtoLayoutComplicationData.Builder

Builder for ProtoLayoutComplicationData.

Public fields

final @NonNull LayoutElementBuilders.Layout

The LayoutElementBuilders.Layout to be displayed when the device is ambient.

final ComplicationText

The content description field for accessibility and is used to describe what data the image represents.

final @NonNull LayoutElementBuilders.Layout

The LayoutElementBuilders.Layout to be displayed when the device is interactive.

final @NonNull ResourceBuilders.Resources

The ResourceBuilders.Resources for ambientLayout and interactiveLayout.

Public methods

boolean
equals(Object other)
int
@NonNull String

Inherited fields

From androidx.wear.watchface.complications.data.ComplicationData
final ComponentName

The ComponentName of the androidx.wear.watchface.complications.datasource.ComplicationDataSourceService that provided the ComplicationData.

final PendingIntent

The PendingIntent to send when the complication is tapped on.

final boolean

tapAction which is a PendingIntent unfortunately can't be serialized.

final @NonNull ComplicationType

The ComplicationType of this complication data.

final @NonNull TimeRange

The TimeRange within which the complication should be displayed.

Inherited methods

From androidx.wear.watchface.complications.data.ComplicationData
@NonNull Instant

Returns the next Instant after afterInstant at which any field of the complication may change.

boolean

Returns true if any of the fields of this ComplicationData are placeholders.

Public fields

ambientLayout

public final @NonNull LayoutElementBuilders.Layout ambientLayout

The LayoutElementBuilders.Layout to be displayed when the device is ambient.

contentDescription

public final ComplicationText contentDescription

The content description field for accessibility and is used to describe what data the image represents. If the image is purely stylistic, and does not convey any information to the user, then provide an empty content description. If no content description is provided, a generic content description will be used instead.

interactiveLayout

public final @NonNull LayoutElementBuilders.Layout interactiveLayout

The LayoutElementBuilders.Layout to be displayed when the device is interactive.

Public methods

equals

public boolean equals(Object other)

hashCode

public int hashCode()

toString

public @NonNull String toString()