View.PostDelayed Method

Definition

Overloads

Name Description
PostDelayed(IRunnable, Int64)

Causes the Runnable to be added to the message queue, to be run after the specified amount of time elapses.

PostDelayed(Action, Int64)

Posts an action to run on this view UI thread after a delay.

PostDelayed(IRunnable, Int64)

Causes the Runnable to be added to the message queue, to be run after the specified amount of time elapses.

[Android.Runtime.Register("postDelayed", "(Ljava/lang/Runnable;J)Z", "GetPostDelayed_Ljava_lang_Runnable_JHandler")]
public virtual bool PostDelayed(Java.Lang.IRunnable? action, long delayMillis);
[<Android.Runtime.Register("postDelayed", "(Ljava/lang/Runnable;J)Z", "GetPostDelayed_Ljava_lang_Runnable_JHandler")>]
abstract member PostDelayed : Java.Lang.IRunnable * int64 -> bool
override this.PostDelayed : Java.Lang.IRunnable * int64 -> bool

Parameters

action
IRunnable

The Runnable that will be executed.

delayMillis
Int64

The delay (in milliseconds) until the Runnable will be executed.

Returns

true if the Runnable was successfully placed in to the message queue. Returns false on failure, usually because the looper processing the message queue is exiting. Note that a result of true does not mean the Runnable will be processed -- if the looper is quit before the delivery time of the message occurs then the message will be dropped.

Attributes

Remarks

Causes the Runnable to be added to the message queue, to be run after the specified amount of time elapses. The runnable will be run on the user interface thread.

Java documentation for android.view.View.postDelayed(java.lang.Runnable, long).

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.

See also

Applies to

PostDelayed(Action, Int64)

Posts an action to run on this view UI thread after a delay.

public bool PostDelayed(Action action, long delayMillis);
member this.PostDelayed : Action * int64 -> bool

Parameters

action
Action

The System.Action value used for action.

delayMillis
Int64

The System.Int64 value used for delay millis.

Returns

The result of the post delayed operation.

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