Udostępnij za pośrednictwem


View.PostDelayed Method

Definition

Overloads

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)

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)

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

Parameters

action
Action
delayMillis
Int64

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