Status.StopwatchPart


public final class Status.StopwatchPart extends Status.TimerOrStopwatchPart


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

Available since wear-ongoing:1.0.0

Summary

Public constructors

StopwatchPart(long timeZeroMillis)

Create a Part representing a stopwatch.

StopwatchPart(long timeZeroMillis, long pausedAtMillis)

Create a Part representing a stopwatch.

StopwatchPart(
    long timeZeroMillis,
    long pausedAtMillis,
    long totalDurationMillis
)

Create a Part representing a stopwatch.

Inherited methods

From androidx.wear.ongoing.Status.TimerOrStopwatchPart
boolean
long
getNextChangeTimeMillis(long fromTimeMillis)

See getNextChangeTimeMillis

long
@NonNull CharSequence
getText(@NonNull Context context, long timeNowMillis)

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
public StopwatchPart(long timeZeroMillis)

Create a Part representing a stopwatch.

Parameters
long timeZeroMillis

timestamp of the time at which this stopwatch started running.

StopwatchPart

Added in 1.0.0
public StopwatchPart(long timeZeroMillis, long pausedAtMillis)

Create a Part representing a stopwatch.

Parameters
long timeZeroMillis

timestamp of the time at which this stopwatch started running.

long pausedAtMillis

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

StopwatchPart

Added in 1.0.0
public StopwatchPart(
    long timeZeroMillis,
    long pausedAtMillis,
    long totalDurationMillis
)

Create a Part representing a stopwatch.

Parameters
long timeZeroMillis

timestamp of the time at which this stopwatch started running.

long pausedAtMillis

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

long totalDurationMillis

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