private async Task ClearValidic() { fitnessListFetcher = null; totalValidic.Text = string.Empty; await Task.Delay(10); }
private async Task LoadValidic() { // Sum of calories double total = 0; fitnessListFetcher = new ValidicFitnnessDataFetcher(); fitnessList = await fitnessListFetcher.fetchFitness(); if (fitnessList != null) { foreach (Fitness f in fitnessList) { total += (int)f.calories; } } // Display the result totalValidic.Text = total.ToString(); }