Compartilhar via


AsyncTask.OnCancelled Method

Definition

Overloads

OnCancelled()

Applications should preferably override #onCancelled(Object).

OnCancelled(Object)

Runs on the UI thread after #cancel(boolean) is invoked and #doInBackground(Object[]) has finished.

OnCancelled()

Applications should preferably override #onCancelled(Object).

[Android.Runtime.Register("onCancelled", "()V", "GetOnCancelledHandler")]
protected virtual void OnCancelled ();
[<Android.Runtime.Register("onCancelled", "()V", "GetOnCancelledHandler")>]
abstract member OnCancelled : unit -> unit
override this.OnCancelled : unit -> unit
Attributes

Remarks

Applications should preferably override #onCancelled(Object). This method is invoked by the default implementation of #onCancelled(Object). The default version does nothing.

Runs on the UI thread after #cancel(boolean) is invoked and #doInBackground(Object[]) has finished.

Java documentation for android.os.AsyncTask.onCancelled().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OnCancelled(Object)

Runs on the UI thread after #cancel(boolean) is invoked and #doInBackground(Object[]) has finished.

[Android.Runtime.Register("onCancelled", "(Ljava/lang/Object;)V", "GetOnCancelled_Ljava_lang_Object_Handler")]
protected virtual void OnCancelled (Java.Lang.Object? result);
[<Android.Runtime.Register("onCancelled", "(Ljava/lang/Object;)V", "GetOnCancelled_Ljava_lang_Object_Handler")>]
abstract member OnCancelled : Java.Lang.Object -> unit
override this.OnCancelled : Java.Lang.Object -> unit

Parameters

result
Object

The result, if any, computed in #doInBackground(Object[]), can be null

Attributes

Remarks

Runs on the UI thread after #cancel(boolean) is invoked and #doInBackground(Object[]) has finished.

The default implementation simply invokes #onCancelled() and ignores the result. If you write your own implementation, do not call super.onCancelled(result).

Java documentation for android.os.AsyncTask.onCancelled(Result).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to