private async Task UpdateVideos() { var indicator = new ProgressBar(this); try { indicator.Activated = true; var videos = new ObservableCollection <YouTubeVideo>((await YouTubeDataCollection.LoadVideosAsync("Xamarin Android", "relevance", null, 50)).Item2); _dataCollection = new C1DataCollection <YouTubeVideo>(videos).AsPlain(); await _dataCollection.GroupAsync("ChannelTitle"); RecyclerView.SetLayoutManager(new LinearLayoutManager(this)); RecyclerView.SetAdapter(new YouTubeAdapter(_dataCollection)); } catch { var builder = new Android.App.AlertDialog.Builder(this); builder.SetMessage(Resources.GetString(Resource.String.InternetConnectionError)); var alert = builder.Create(); alert.Show(); } finally { indicator.Activated = false; } }