public final class TaskHandler extends Object
Runnables on either the current
thread or the application's main thread.| Constructor and Description |
|---|
TaskHandler(boolean runOnMainThread)
Initialize a new task handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run(Runnable task)
Execute the task, either by submitting it to the main
Looper or
running it on the current thread. |
public TaskHandler(boolean runOnMainThread)
runOnMainThread - true if tasks submitted to this handler
should run on the application's main Looper.public void run(Runnable task)
Looper or
running it on the current thread.task - The task to run.Copyright © 2021. All rights reserved.