共用方式為


Handler.PostAtFrontOfQueue Method

Definition

Overloads

PostAtFrontOfQueue(IRunnable)

Posts a message to an object that implements Runnable.

PostAtFrontOfQueue(Action)

PostAtFrontOfQueue(IRunnable)

Posts a message to an object that implements Runnable.

[Android.Runtime.Register("postAtFrontOfQueue", "(Ljava/lang/Runnable;)Z", "")]
public bool PostAtFrontOfQueue (Java.Lang.IRunnable r);
[<Android.Runtime.Register("postAtFrontOfQueue", "(Ljava/lang/Runnable;)Z", "")>]
member this.PostAtFrontOfQueue : Java.Lang.IRunnable -> bool

Parameters

r
IRunnable

The Runnable that will be executed.

Returns

Returns true if the message was successfully placed in to the message queue. Returns false on failure, usually because the looper processing the message queue is exiting.

Attributes

Remarks

Posts a message to an object that implements Runnable. Causes the Runnable r to executed on the next iteration through the message queue. The runnable will be run on the thread to which this handler is attached. <b>This method is only for use in very special circumstances -- it can easily starve the message queue, cause ordering problems, or have other unexpected side-effects.</b>

Java documentation for android.os.Handler.postAtFrontOfQueue(java.lang.Runnable).

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

PostAtFrontOfQueue(Action)

public bool PostAtFrontOfQueue (Action action);
member this.PostAtFrontOfQueue : Action -> bool

Parameters

action
Action

Returns

Remarks

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