using Android.OS;
public class MyThread
{
public void Run()
{
RunOnUiThread(() => DoSomething());
}
private void RunOnUiThread(Action action)
{
using (var handler = new Handler(Looper.MainLooper))
{
handler.Post(action);
}
}
}
Tuesday, January 10, 2017
[HowTo] Call any code on UI thread outside of Activity
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment