TimeDependentText
interface TimeDependentText
Status.Part |
Abstract class to represent An Ongoing activity status or part of it. |
Status |
Base class to represent the status of an Ongoing Activity and render it. |
Status.StopwatchPart |
An Ongoing activity status (or part of it) representing a stopwatch |
Status.TextPart |
An Ongoing activity status (or part of it) representing a plain, static text. |
Status.TimerOrStopwatchPart |
Base class for |
Status.TimerPart |
An Ongoing activity status (or part of it) representing a timer. |
Represents the status or a part of the status of an ongoing activity. Its content may change with time (for example, if the status contains a timer)
Summary
Public methods |
|
|---|---|
abstract @NonNull long |
getNextChangeTimeMillis(@NonNull long fromTimeMillis)Returns the timestamp of the next time when the display may be different from the one at the specified time. |
abstract @NonNull CharSequence |
Returns a textual representation of the ongoing activity status or a part of it at the given time represented as milliseconds timestamp For forward compatibility, the best way to display this is on a |
Public methods
getNextChangeTimeMillis
@NonNull
public abstract long getNextChangeTimeMillis(@NonNull long fromTimeMillis)
Returns the timestamp of the next time when the display may be different from the one at the specified time.
| Parameters | |
|---|---|
@NonNull long fromTimeMillis |
current time, usually now as returned by |
| Returns | |
|---|---|
long |
the first point in time after |
getText
@NonNull
public abstract CharSequence getText(@NonNull Context context, @NonNull long timeNowMillis)
Returns a textual representation of the ongoing activity status or a part of it at the given time represented as milliseconds timestamp For forward compatibility, the best way to display this is on a android.widget.TextView
| Parameters | |
|---|---|
@NonNull Context context |
may be used for internationalization. Only used while this method executed. |
@NonNull long timeNowMillis |
the timestamp of the time we want to display, usually now, as returned by |