public abstract class SimpleTask
extends java.lang.Object
implements java.lang.Runnable
| Constructor and Description |
|---|
SimpleTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
abstract void |
doInBackground()
A worker will execute this method in a background thread
|
boolean |
isCancelled()
check whether this work is canceled.
|
boolean |
isDone()
check whether this work has done
|
protected void |
onCancel()
When the Task is Cancelled.
|
abstract void |
onFinish(boolean canceled)
will be called after doInBackground();
|
static void |
post(java.lang.Runnable r) |
static void |
postDelay(java.lang.Runnable r,
long delayMillis) |
void |
restart()
Restart the task, just set the state to
STATE_NEW |
void |
run() |
public abstract void doInBackground()
public abstract void onFinish(boolean canceled)
protected void onCancel()
public void restart()
STATE_NEWpublic void run()
run in interface java.lang.Runnablepublic boolean isCancelled()
public boolean isDone()
public void cancel()
public static void post(java.lang.Runnable r)
public static void postDelay(java.lang.Runnable r,
long delayMillis)