TimerStatusPart
open class TimerStatusPart : StatusPart
kotlin.Any | ||
↳ | androidx.wear.ongoing.StatusPart | |
↳ | androidx.wear.ongoing.TimerStatusPart |
An Ongoing activity status (or part of it) representing a timer or stopwatch. Available since wear-ongoing:1.0.0
Summary
Public constructors | |
---|---|
Create a Status representing a timer or stopwatch. |
|
Create a Status representing a timer or stopwatch. |
|
Create a Status representing a timer or stopwatch. |
|
Create a Status representing stopwatch. |
Public methods | |
---|---|
open Boolean | |
open Long |
getNextChangeTimeMillis(fromTimeMillis: Long) |
open Long | |
open CharSequence | |
open Long | |
open Long | |
open Boolean |
Determines if this timer has a total duration set. |
open Int |
hashCode() |
open Boolean | |
open Boolean |
isPaused() Determines if this timer is paused. |
Public constructors
<init>
TimerStatusPart(
timeZeroMillis: Long,
countDown: Boolean,
pausedAtMillis: Long,
totalDurationMillis: Long)
Create a Status representing a timer or stopwatch.
Parameters | |
---|---|
timeZeroMillis |
Long: timestamp of the time at which this Timer should display 0, will be in the past for a stopwatch and usually in the future for timers. |
countDown |
Boolean: indicates if this is a stopwatch (when false or timer (when true ). |
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/stopwatch, useful to display as a progress bar or similar. |
<init>
TimerStatusPart(
timeZeroMillis: Long,
countDown: Boolean,
pausedAtMillis: Long)
Create a Status representing a timer or stopwatch.
Parameters | |
---|---|
timeZeroMillis |
Long: timestamp of the time at which this Timer should display 0, will be in the past for a stopwatch and usually in the future for timers. |
countDown |
Boolean: indicates if this is a stopwatch (when false ) or timer (when true ). |
pausedAtMillis |
Long: timestamp of the time when this timer was paused. Or -1L if this timer is running. |
<init>
TimerStatusPart(
timeZeroMillis: Long,
countDown: Boolean)
Create a Status representing a timer or stopwatch.
Parameters | |
---|---|
timeZeroMillis |
Long: timestamp of the time at which this Timer should display 0, will be in the past for a stopwatch and usually in the future for timers. |
countDown |
Boolean: indicates if this is a stopwatch (when false ) or timer (when true ). |
<init>
TimerStatusPart(timeZeroMillis: Long)
Create a Status representing stopwatch.
Parameters | |
---|---|
timeZeroMillis |
Long: timestamp of the time at which this Stopwatch started. |
Public methods
getNextChangeTimeMillis
open fun getNextChangeTimeMillis(fromTimeMillis: Long): Long
See TimeDependentText#getNextChangeTimeMillis(long)
Parameters | |
---|---|
fromTimeMillis |
Long: current time, usually now as returned by android. |