Note: As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this Help Center article.

Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

public final class PlainComplicationText implements ComplicationText


A ComplicationText that contains plain text.

Summary

Nested types

A builder for PlainComplicationText.

Public methods

boolean
equals(Object other)
@NonNull Instant

Returns the next time after afterInstant at which the text may change.

@NonNull CharSequence
getTextAt(@NonNull Resources resources, @NonNull Instant instant)

Returns the text that should be displayed for the given timestamp.

int
boolean
boolean
returnsSameText(
    @NonNull Instant firstInstant,
    @NonNull Instant secondInstant
)

Returns true if the result of getTextAt will be the same for both firstInstant and secondInstant.

@NonNull String

Public methods

equals

public boolean equals(Object other)

getNextChangeTime

Added in 1.3.0-alpha03
public @NonNull Instant getNextChangeTime(@NonNull Instant afterInstant)

Returns the next time after afterInstant at which the text may change.

getTextAt

Added in 1.3.0-alpha03
public @NonNull CharSequence getTextAt(@NonNull Resources resources, @NonNull Instant instant)

Returns the text that should be displayed for the given timestamp.

Parameters
@NonNull Resources resources

Resources from the current context

@NonNull Instant instant

The Instant at which to sample the text

hashCode

public int hashCode()

isAlwaysEmpty

Added in 1.3.0-alpha03
public boolean isAlwaysEmpty()

returnsSameText

Added in 1.3.0-alpha03
public boolean returnsSameText(
    @NonNull Instant firstInstant,
    @NonNull Instant secondInstant
)

Returns true if the result of getTextAt will be the same for both firstInstant and secondInstant.

toString

public @NonNull String toString()