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);
}
}
}
No comments:
Post a Comment