TextOngoingActivityStatus
open class TextOngoingActivityStatus : OngoingActivityStatus
kotlin.Any | ||
↳ | androidx.wear.ongoingactivity.OngoingActivityStatus | |
↳ | androidx.wear.ongoingactivity.TextOngoingActivityStatus |
OngoingActivityStatus
representing a plain, static text.
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open Boolean | |
open Long |
getNextChangeTimeMillis(fromTimeMillis: Long) |
open CharSequence | |
open Int |
hashCode() |
Public constructors
<init>
TextOngoingActivityStatus(@NonNull str: String)
Public methods
getNextChangeTimeMillis
open fun getNextChangeTimeMillis(fromTimeMillis: Long): Long
See OngoingActivityStatus#getNextChangeTimeMillis(long)
Parameters | |
---|---|
fromTimeMillis |
Long: current time, usually now as returned by android.os.SystemClock#elapsedRealtime() . In most cases getText and getNextChangeTimeMillis should be called with the exact same timestamp, so changes are not missed. |
Return | |
---|---|
Long |
the first point in time after fromTimeMillis when the displayed value of this status will change. returns Long.MAX_VALUE if the display will never change. |
getText
@NonNull open fun getText(
@NonNull context: Context,
timeNowMillis: Long
): CharSequence
See OngoingActivityStatus#getText(Context, long)
Parameters | |
---|---|
context |
Context: may be used for internationalization. Only used while this method executed. |
timeNowMillis |
Long: the timestamp of the time we want to display, usually now, as returned by android.os.SystemClock#elapsedRealtime() . |
hashCode
open fun hashCode(): Int