private async void Load() { _dataCollection = new YouTubeDataCollection(); var grouping = new C1GroupDataCollection <YouTubeVideo>(_dataCollection, true); await grouping.GroupAsync("PublishedDay"); RecyclerView.SetLayoutManager(new LinearLayoutManager(this)); RecyclerView.SetAdapter(new YouTubeAdapter(grouping)); }
private async void Load() { _dataCollection = new YouTubeDataCollection() { PageSize = 25 }; var grouping = new C1GroupDataCollection <YouTubeVideo>(_dataCollection, false); await grouping.GroupAsync("PublishedDay"); grid.ItemsSource = grouping; grid.MinColumnWidth = 85; search.Text = "Xamarin.Forms"; var task = PerformSearch(); }
protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); _dataCollection = new YouTubeDataCollection() { PageSize = 25 }; var grouping = new C1GroupDataCollection <YouTubeVideo>(_dataCollection, false); await grouping.GroupAsync("PublishedDay"); AssociatedObject.ItemsSource = grouping; await PerformSearch(); }
private async void Load() { CollectionView.BackgroundColor = UIColor.White; SearchField.EditingChanged += OnSearchEditingChanged; SearchField.ShouldReturn = new UITextFieldCondition(tf => { tf.ResignFirstResponder(); return(true); }); _collectionView = new YouTubeDataCollection(); _collectionView.PageSize = 50; var itemSize = 100; var grouping = new C1GroupDataCollection <YouTubeVideo>(_collectionView, false); await grouping.GroupAsync("PublishedDay"); var source = new YouTubeCollectionViewSource(CollectionView); source.ItemsSource = grouping; source.EmptyMessageLabel.TextColor = UIColor.Black; source.EmptyMessageLabel.Text = Foundation.NSBundle.MainBundle.GetLocalizedString("EmptyText", ""); var layout = new C1CollectionViewFlowLayout(); layout.SectionHeadersPinToVisibleBounds = true; layout.EstimatedItemSize = new CGSize(itemSize, itemSize); layout.HeaderReferenceSize = new CGSize(25, 25); source.CollectionViewLayout = layout; CollectionView.Source = source; }