TimeFormatComplicationText

class TimeFormatComplicationText : ComplicationText


A ComplicationText that shows a formatted time.

Summary

Public functions

open operator Boolean
equals(other: Any?)
open Instant
getNextChangeTime(afterInstant: Instant)

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

open CharSequence
getTextAt(resources: Resources, instant: Instant)

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

open Int
open Boolean
open Boolean
returnsSameText(firstInstant: Instant, secondInstant: Instant)

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

open String

Public functions

equals

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

getNextChangeTime

Added in 1.3.0-alpha01
open fun getNextChangeTime(afterInstant: Instant): Instant

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

getTextAt

Added in 1.3.0-alpha01
open fun getTextAt(resources: Resources, instant: Instant): CharSequence

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

Parameters
resources: Resources

Resources from the current context

instant: Instant

The Instant at which to sample the text

hashCode

open fun hashCode(): Int

isAlwaysEmpty

Added in 1.3.0-alpha01
open fun isAlwaysEmpty(): Boolean

returnsSameText

Added in 1.3.0-alpha01
open fun returnsSameText(firstInstant: Instant, secondInstant: Instant): Boolean

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

toString

open fun toString(): String