public class LottieTask<T>
extends java.lang.Object
addListener(LottieListener).
Failures can be obtained with addFailureListener(LottieListener).
A task will produce a single result or a single failure.| Modifier and Type | Field and Description |
|---|---|
static java.util.concurrent.Executor |
EXECUTOR
Set this to change the executor that LottieTasks are run on.
|
| Constructor and Description |
|---|
LottieTask(java.util.concurrent.Callable<LottieResult<T>> runnable) |
| Modifier and Type | Method and Description |
|---|---|
LottieTask<T> |
addFailureListener(LottieListener<java.lang.Throwable> listener)
Add a task failure listener.
|
LottieTask<T> |
addListener(LottieListener<T> listener)
Add a task listener.
|
LottieTask<T> |
removeFailureListener(LottieListener<java.lang.Throwable> listener)
Remove a given task failure listener.
|
LottieTask<T> |
removeListener(LottieListener<T> listener)
Remove a given task listener.
|
public static java.util.concurrent.Executor EXECUTOR
public LottieTask(java.util.concurrent.Callable<LottieResult<T>> runnable)
public LottieTask<T> addListener(LottieListener<T> listener)
public LottieTask<T> removeListener(LottieListener<T> listener)
public LottieTask<T> addFailureListener(LottieListener<java.lang.Throwable> listener)
public LottieTask<T> removeFailureListener(LottieListener<java.lang.Throwable> listener)