Status.TimerOrStopwatchPart
public abstract class Status.TimerOrStopwatchPart extends Status.Part
| java.lang.Object | ||
| ↳ | androidx.wear.ongoing.Status.Part | |
| ↳ | androidx.wear.ongoing.Status.TimerOrStopwatchPart |
Status.StopwatchPart |
An Ongoing activity status (or part of it) representing a stopwatch |
Status.TimerPart |
An Ongoing activity status (or part of it) representing a timer. |
Base class for TimerPart and StopwatchPart, defines the getters but can't be created directly, create one of those instead.
Summary
Public methods |
|
|---|---|
boolean |
|
long |
getNextChangeTimeMillis(long fromTimeMillis) |
long |
|
@NonNull CharSequence |
See |
long |
|
long |
|
boolean |
Determines if this has a total duration set. |
int |
hashCode() |
boolean |
|
boolean |
isPaused()Determines if this Timer or Stopwatch is paused. i.e. the display representation will not change over time. |
Public methods
getPausedAtMillis
public long getPausedAtMillis()
| Returns | |
|---|---|
long |
the timestamp of the time when this was paused. Use |
getText
public @NonNull CharSequence getText(@NonNull Context context, long timeNowMillis)
See getText
getTimeZeroMillis
public long getTimeZeroMillis()
| Returns | |
|---|---|
long |
the time at which this Timer or Stopwatch will display 0, will usually be in the past for a stopwatch and in the future for timers. |
getTotalDurationMillis
public long getTotalDurationMillis()
| Returns | |
|---|---|
long |
the total duration of this timer/stopwatch, if set. Use |
hasTotalDuration
public boolean hasTotalDuration()
Determines if this has a total duration set.
| Returns | |
|---|---|
boolean |
|
isCountDown
public boolean isCountDown()
| Returns | |
|---|---|
boolean |
|