Status.TimerPart

public final class Status.TimerPart extends Status.Part, Status.TimerOrStopwatchPart implements TimeDependentText

Object
   ↳ Status.Part
     ↳ Status.TimerOrStopwatchPart
       ↳ Status.TimerPart

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

Available since wear-ongoing:1.0.0

Summary

Public constructors

TimerPart(long timeZeroMillis)

Create a Part representing a timer.

TimerPart(long timeZeroMillis, long pausedAtMillis)

Create a Part representing a timer.

TimerPart(
    long timeZeroMillis,
    long pausedAtMillis,
    long totalDurationMillis
)

Create a Part representing a timer.

Inherited methods

From class Status.TimerOrStopwatchPart
@Override boolean
@Override long
getNextChangeTimeMillis(long fromTimeMillis)

See getNextChangeTimeMillis

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

See getText

long
long
boolean

Determines if this has a total duration set.

@Override int
boolean
boolean

Determines if this Timer or Stopwatch is paused.

Public constructors

TimerPart

public TimerPart(long timeZeroMillis)

Create a Part representing a timer.

Parameters
long timeZeroMillis

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

TimerPart

public TimerPart(long timeZeroMillis, long pausedAtMillis)

Create a Part representing a timer.

Parameters
long timeZeroMillis

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

long pausedAtMillis

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

TimerPart

public TimerPart(
    long timeZeroMillis,
    long pausedAtMillis,
    long totalDurationMillis
)

Create a Part representing a timer.

Parameters
long timeZeroMillis

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

long pausedAtMillis

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

long totalDurationMillis

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