private void InvokeCommandAndShowBusyIndicator(Action command)
{
this.activityIndicatorView.StartAnimating();
BackgroundWorker backgroundWorker = new BackgroundWorker();
backgroundWorker.DoWork += (s2, e2) =>
{
this.InvokeOnMainThread(() =>
{
command();
});
};
backgroundWorker.RunWorkerAsync();
backgroundWorker.RunWorkerCompleted += (s3, e3) =>
{
this.activityIndicatorView.StopAnimating();
};
}