Status.StopwatchPart


class Status.StopwatchPart : Status.TimerOrStopwatchPart


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

Available since wear-ongoing:1.0.0

Summary

Public constructors

StopwatchPart(timeZeroMillis: Long)

Create a Part representing a stopwatch.

StopwatchPart(timeZeroMillis: Long, pausedAtMillis: Long)

Create a Part representing a stopwatch.

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

Create a Part representing a stopwatch.

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

StopwatchPart

Added in 1.0.0
StopwatchPart(timeZeroMillis: Long)

Create a Part representing a stopwatch.

Parameters
timeZeroMillis: Long

timestamp of the time at which this stopwatch started running.

StopwatchPart

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

Create a Part representing a stopwatch.

Parameters
timeZeroMillis: Long

timestamp of the time at which this stopwatch started running.

pausedAtMillis: Long

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

StopwatchPart

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

Create a Part representing a stopwatch.

Parameters
timeZeroMillis: Long

timestamp of the time at which this stopwatch started running.

pausedAtMillis: Long

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

totalDurationMillis: Long

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