Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Wait cursor when running tasks

$
0
0

I'm using a pattern like this when doing tasks (db, network) to show the user that the app is busy

// BT is @NicWise‌  BTProgressHUD component
BTProgressHUD.Show ("Downloading Data From Server...");

Task task = Task.Factory.StartNew( () => {
    // code to call service and update db 
});

task.Wait();

// refresh tableview, etc

BTProgressHUD.Dismiss ();

This works, but it seems like the Alert is not shown for the full duration of the "work" that I'm doing.

Is there a more reliable approach to handling this?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>