Status.TimerPart


class Status.TimerPart : Status.TimerOrStopwatchPart


An Ongoing activity status (or part of it) representing a timer.

Available since wear-ongoing:1.0.0

Summary

Public constructors

TimerPart(timeZeroMillis: Long)

Create a Part representing a timer.

TimerPart(timeZeroMillis: Long, pausedAtMillis: Long)

Create a Part representing a timer.

TimerPart(
    timeZeroMillis: Long,
    pausedAtMillis: Long,
    totalDurationMillis: Long
)

Create a Part representing a timer.

Inherited functions

From androidx.wear.ongoing.Status.TimerOrStopwatchPart
Boolean
equals(obj: Any?)
Long
getNextChangeTimeMillis(fromTimeMillis: Long)

See getNextChangeTimeMillis

Long
CharSequence
getText(context: Context, timeNowMillis: Long)

See getText

Long
Long
Boolean

Determines if this has a total duration set.

Int
Boolean
Boolean

Determines if this Timer or Stopwatch is paused. i.e. the display representation will not change over time.

Public constructors

TimerPart

Added in 1.0.0
TimerPart(timeZeroMillis: Long)

Create a Part representing a timer.

Parameters
timeZeroMillis: Long

timestamp of the time at the future in which this Timer should display 0.

TimerPart

Added in 1.0.0
TimerPart(timeZeroMillis: Long, pausedAtMillis: Long)

Create a Part representing a timer.

Parameters
timeZeroMillis: Long

timestamp of the time at the future in which this Timer should display 0.

pausedAtMillis: Long

timestamp of the time when this timer was paused. Or -1L if this timer is running.

TimerPart

Added in 1.0.0
TimerPart(
    timeZeroMillis: Long,
    pausedAtMillis: Long,
    totalDurationMillis: Long
)

Create a Part representing a timer.

Parameters
timeZeroMillis: Long

timestamp of the time at the future in which this Timer should display 0.

pausedAtMillis: Long

timestamp of the time when this timer was paused. Or -1L if this timer is running.

totalDurationMillis: Long

total duration of this timer, useful to display as a progress bar or similar.