TimeFormatComplicationText

public final class TimeFormatComplicationText implements ComplicationText


A ComplicationText that shows a formatted time.

Summary

Public methods

boolean
equals(Object other)
@NonNull Instant
getNextChangeTime(Instant afterInstant)

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

@NonNull CharSequence
getTextAt(Resources resources, Instant instant)

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

int
boolean
boolean
returnsSameText(Instant firstInstant, 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

public @NonNull Instant getNextChangeTime(Instant afterInstant)

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

getTextAt

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

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

Parameters
Resources resources

Resources from the current context

Instant instant

The