HandlerKt
public final class HandlerKt
Summary
Public methods |
|
|---|---|
static final @NonNull Runnable |
HandlerKt.postAtTime(Version of |
static final @NonNull Runnable |
HandlerKt.postDelayed(Version of |
Public methods
HandlerKt.postAtTime
@NonNull
public static final Runnable HandlerKt.postAtTime(
@NonNull Handler receiver,
long uptimeMillis,
@Nullable Object token,
@NonNull Function0<Unit> action
)
Version of Handler.postAtTime which re-orders the parameters, allowing the action to be placed outside of parentheses.
handler.postAtTime(200) {
doSomething()
}
| Parameters | |
|---|---|
@Nullable Object token |
An optional object with which the posted message will be associated. |
| Returns | |
|---|---|
Runnable |
the created Runnable |
HandlerKt.postDelayed
@NonNull
public static final Runnable HandlerKt.postDelayed(
@NonNull Handler receiver,
long delayInMillis,
@Nullable Object token,
@NonNull Function0<Unit> action
)
Version of Handler.postDelayed which re-orders the parameters, allowing the action to be placed outside of parentheses.
handler.postDelayed(200) {
doSomething()
}
| Returns | |
|---|---|
Runnable |
the created Runnable |