Android.App.Instrumentation.RunOnMainSync Method
Execute a call on the application's main thread, blocking until it is complete.

Syntax

[Android.Runtime.Register("runOnMainSync", "(Ljava/lang/Runnable;)V", "GetRunOnMainSync_Ljava_lang_Runnable_Handler")]
public virtual void RunOnMainSync (Java.Lang.IRunnable runner)

Parameters

runner
The code to run on the main thread.

Remarks

Execute a call on the application's main thread, blocking until it is complete. Useful for doing things that are not thread-safe, such as looking at or modifying the view hierarchy.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1