org.solovyev.android.tasks
Class TaskOverlayDialog<V>
java.lang.Object
org.solovyev.android.tasks.TaskOverlayDialog<V>
- Type Parameters:
V - type of the task result
- All Implemented Interfaces:
- ContextCallback<android.app.Activity,V>
public final class TaskOverlayDialog<V>
- extends Object
- implements ContextCallback<android.app.Activity,V>
Task overlay dialog - masks the whole screen and prevents user to do anything until task has been finished
|
Method Summary |
static TaskOverlayDialog<?> |
attachToTask(org.solovyev.tasks.TaskService taskService,
android.app.Activity activity,
String taskName,
int titleResId,
int messageResId)
Method tries to attach overlay dialog to the task identified by taskName. |
void |
dismiss()
|
void |
onFailure(android.app.Activity context,
Throwable t)
|
void |
onSuccess(android.app.Activity context,
V result)
|
void |
show()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
attachToTask
@Nullable
public static TaskOverlayDialog<?> attachToTask(@Nonnull
org.solovyev.tasks.TaskService taskService,
@Nonnull
android.app.Activity activity,
@Nonnull
String taskName,
int titleResId,
int messageResId)
- Method tries to attach overlay dialog to the task identified by taskName.
If task has been finished or not started - nothing is done and null is returned.
- Parameters:
taskService - task serviceactivity - activity which should be maskedtaskName - name of the task which result is waitedtitleResId - dialog titlemessageResId - dialog message
- Returns:
- not null dialog if task is running, null otherwise
onSuccess
public void onSuccess(@Nonnull
android.app.Activity context,
V result)
- Specified by:
onSuccess in interface ContextCallback<android.app.Activity,V>
dismiss
public void dismiss()
show
public void show()
onFailure
public void onFailure(@Nonnull
android.app.Activity context,
Throwable t)
- Specified by:
onFailure in interface ContextCallback<android.app.Activity,V>
Copyright © 2013. All Rights Reserved.