public override CGSize GetReferenceSizeForHeader( [NotNull] UICollectionView collectionView, [NotNull] UICollectionViewLayout layout, nint section) { return(((UICollectionViewFlowLayout)layout).HeaderReferenceSize); }
public override nfloat GetMinimumLineSpacingForSection( [NotNull] UICollectionView collectionView, [NotNull] UICollectionViewLayout layout, nint section) { return(((UICollectionViewFlowLayout)layout).MinimumLineSpacing); }
public override UIEdgeInsets GetInsetForSection( [NotNull] UICollectionView collectionView, [NotNull] UICollectionViewLayout layout, nint section) { return(((UICollectionViewFlowLayout)layout).SectionInset); }
public ImagesCollectionViewController(UICollectionViewLayout layout) : base(layout) { CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; monkeys = Monkeys.Instance; }
public override CGSize GetSizeForItem( [NotNull] UICollectionView collectionView, [NotNull] UICollectionViewLayout layout, [NotNull] NSIndexPath indexPath) { return(((UICollectionViewFlowLayout)layout).ItemSize); }
public BingImageGridViewController (UICollectionViewLayout layout) : base (layout) { imageUrls = new List<string> (); CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; }
public override CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var width = collectionView.Frame.Width - _sectionEdgeInsets.Left - _sectionEdgeInsets.Right; switch (indexPath.Row) { case 0: { var linesCount = _accountsWidgetViewModel.Accounts.Count / 3; linesCount += _accountsWidgetViewModel.Accounts.Count % 3 == 0 ? 0 : 1; nfloat height = _accountCellHeight * linesCount; height += _minimumLineSpacing * (linesCount - 1); height += _sectionEdgeInsets.Top + _sectionEdgeInsets.Bottom + _titleHeight; return(new CGSize(width, height)); } case 1: { return(new CGSize(width, 100)); } default: { var height = _transactionCellHeight * _transactionsWidgetViewModel.Transactions.Count; return(new CGSize(width, height + _titleHeight + 64)); } } }
public CollectionViewController (UICollectionViewLayout layout) : base (layout) { Speakers = new Speakers (); CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; }
public override CoreGraphics.CGSize GetSizeForItem (UICollectionView collectionView, UICollectionViewLayout layout, Foundation.NSIndexPath indexPath) { if (Master.MaxHeight != 0) { return new CoreGraphics.CGSize ((Master.View.Frame.Size.Width - 10) / 3, Master.MaxHeight); } return new CoreGraphics.CGSize ((Master.View.Frame.Size.Width - padding - 10) / 3, (Master.View.Frame.Size.Width - padding - 10) / 3 + differential); }
internal CGSize GetReferenceSizeForHeader(UICollectionView collectionView, UICollectionViewLayout layout, nint section) { // Currently we explicitly measure all of the headers/footers // Long-term, we might want to look at performance hints (similar to ItemSizingStrategy) for // headers/footers (if the dev knows for sure they'll all the be the same size) return(GetReferenceSizeForheaderOrFooter(collectionView, ItemsView.GroupHeaderTemplate, UICollectionElementKindSectionKey.Header, section)); }
public SimpleCollectionViewController (UICollectionViewLayout layout) : base (layout) { animals = new List<IAnimal> (); for (int i = 0; i < 20; i++) { animals.Add (new Monkey ()); } }
public ImagesCollectionViewController (UICollectionViewLayout layout) : base (layout) { CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; monkeys = Monkeys.Instance; }
public override CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var size = new CGSize(); size.Width = collectionView.Frame.Width / 2; size.Height = collectionView.Frame.Height; return(size); }
public SpeakersCollectionViewController(UICollectionViewLayout layout) : base(layout) { // speakerData = (from s in Evolve.Core.ConferenceManager.Speakers.Values // orderby s.Name select s).ToList () ; CollectionView.BackgroundView = new UIImageView (UIImage.FromBundle("/Images/Background")); }
public CollectionViewZoomController(UICollectionViewLayout layout) : base(layout) { CollectionView.Delegate = new CollectionZiewZoomDelegate (this); CollectionView.RegisterClassForCell (typeof (CollectionViewZoomCell), CollectionViewZoomCell.Key); scale = 1.0f; }
public override SizeF GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var tag = _c._tags[indexPath.Item]; string name = " " + tag.name + " "; float width = collectionView.StringSize(name, UIFont.SystemFontOfSize(13), new SizeF(160, 20)).Width; return(new SizeF(width, 27)); }
public CGSize SizeForItemAtIndexPath(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var cellWidth = ((collectionView.Frame.Width - (2 * 5)) / 2) - (2 * 5); var cellHeight = cellWidth * 1.2; return(new CGSize(cellWidth, cellHeight)); }
public CollectionViewController(UICollectionViewLayout layout) : base(layout) { Speakers = new Speakers(); // TODO: Step1b: set size and color of the UICollectionView // CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; // CollectionView.BackgroundColor = UIColor.White; }
// this is the override that allows you to dynamically size UICollectionView items public override CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { return(new CGSize(325, 40)); //return new SizeF( // width: UIScreen.MainScreen.Bounds.Width, // Set the width to whatever you want. In this case, it's the screen width. // height: Persons[indexPath.Row].Height // Set the item height //); }
public SimpleCollectionViewController(UICollectionViewLayout layout) : base(layout) { classifications = new List <IClassification>(); for (int i = 0; i < 12; i++) { classifications.Add(new Amphibian()); } }
public override CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { nfloat cellWidth = LayoutConfig.GetCellWidthRelativeToCollectionViewWidth(collectionView, _itemsDisplayedOnScreen); _parentController.SetCollectionViewHeight(cellWidth); return(new CGSize(cellWidth, cellWidth)); }
public virtual UIEdgeInsets GetInsetForSection(UICollectionView collectionView, UICollectionViewLayout layout, int section) { float top = (section == 0) ? 20.0f : 0.0f; return new UIEdgeInsets (top, 20.0f, 10.0f, 20.0f); }
public CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { // 3 friends per row var width = collectionView.Frame.Width / 3; var height = width + 27; return(new CGSize(width, height)); }
public CGSize GetSizeForItem (UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { // 3 friends per row var width = collectionView.Frame.Width / 3; var height = width + 27; return new CGSize (width, height); }
public MemoryDemoViewController(UICollectionViewLayout layout) : base(layout) { // Create the image from the test.png file image = UIImage.FromFile("test.png"); CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; }
public SimpleCollectionViewController(UICollectionViewLayout layout) : base(layout) { animals = new List <IAnimal> (); for (int i = 0; i < 20; i++) { animals.Add(new Monkey()); } }
public MemoryDemoViewController (UICollectionViewLayout layout) : base (layout) { // Create the image from the test.png file image = UIImage.FromFile ("test.png"); CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; }
public CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { UICollectionViewFlowLayout layout1 = (UICollectionViewFlowLayout)collectionView.CollectionViewLayout; var space = layout1.MinimumInteritemSpacing + layout1.SectionInset.Left + layout1.SectionInset.Right; var size = (collectionView.Frame.Size.Width / 2) - space; return(new CGSize(size, size)); }
public BaseballPlayerController(UICollectionViewLayout layout) : base(layout) { CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; Team1 = new BaseballPlayers (Team.One); Team2 = new BaseballPlayers (Team.Two); }
public CollectionViewController(UICollectionViewLayout layout, OnItemSelected onItemSelected) : base(layout) { items = new List <string>(); for (int i = 0; i < 20; i++) { items.Add($"#{i}"); } _onItemSelected = onItemSelected; }
public CollectionViewController (UICollectionViewLayout layout) : base (layout) { Speakers = new Speakers (); // TODO: Step 1b: set size and color of the UICollectionView CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.White; }
public virtual CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var item = GetItemAt(indexPath) as IShopAvailabilityItemVM; return(new CoreGraphics.CGSize( PDHorizontalShopsCollectionCell.CELL_WIDTH, (item.DataType == AppRopio.Models.Products.Responses.ProductDataType.ShopsAvailability_Count ? PDHorizontalShopsCollectionCell.COUNT_HEIGHT : PDHorizontalShopsCollectionCell.INDICATOR_HEIGHT) )); }
public ModuleViewController(Plugin.Iconize.IIconModule module, UICollectionViewLayout layout) : base(layout) { _module = module; CollectionView.BackgroundColor = UIColor.White; TabBarItem = new UITabBarItem(module.FontFamily, null, 0); }
public CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var cellWidthValue = CachedCellWidths[indexPath.Row]; if (cellWidthValue == null) { Debug.Fail(String.Format("cachedCellWidths for {0} must not be nil", indexPath.Row)); } return new CGSize(cellWidthValue, collectionView.Frame.Height); }
public SimpleCollectionViewController (UICollectionViewLayout layout) : base (layout) { animals = new List<IAnimal> (); for (int i = 0; i< 20; i++) { animals.Add (new Monkey ()); } // CollectionView.ContentInset = new UIEdgeInsets (20, 20, 20, 20); }
public override CGSize GetSizeForItem( UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var paddingSpace = _sectionInsets.Left * (_columnsCount + 1); var availableWidth = collectionView.Frame.Width - paddingSpace; var widthPerItem = availableWidth / _columnsCount; return new CGSize(width: widthPerItem, height: widthPerItem); }
public CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { if (indexPath.Item == 2) { return(new CGSize(_mainView.View.Frame.Width, 150)); } return(new CGSize(_mainView.View.Frame.Width, 230)); }
public ViewController(UICollectionViewLayout layout) : base(layout) { Title = "Monkeys"; CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; CollectionView.BackgroundColor = UIColor.Black; monkeys = Monkeys.Instance; }
internal CGSize GetReferenceSizeForFooter(UICollectionView collectionView, UICollectionViewLayout layout, nint section) { if (!_isGrouped) { return(CGSize.Empty); } return(GetReferenceSizeForheaderOrFooter(collectionView, ItemsView.GroupFooterTemplate, UICollectionElementKindSectionKey.Footer, section)); }
public CGSize SizeForItemAtIndexPath(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { if (indexPath.Row >= this.letterSizes.Count) { return(CGSize.Empty); } return(this.letterSizes[indexPath.Row]); }
public CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var cellWidthValue = cachedCellWidths?[indexPath.Row]; if (cellWidthValue == null) { throw new NullReferenceException($"cachedCellWidths for {indexPath.Row} must not be null"); } return(new CGSize(cellWidthValue.Value, collectionView.Frame.Size.Height)); }
public CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { var item = GetItemAt(indexPath); var label = new UILabel(); label.Text = ((Genre)item).Name; label.Font = FontUtils.GetNormalFont(17); label.SizeToFit(); return(new CGSize(label.Frame.Width + 32, label.Frame.Height + 20)); }
public FavoriteManufactuersViewController(UICollectionViewLayout layout) : base(layout) { manufacturers = new List <IManufacturer>(); manufacturers.Add(new Aerospatiale()); manufacturers.Add(new Airbus()); manufacturers.Add(new Bombardier()); manufacturers.Add(new Grumman()); manufacturers.Add(new Lake()); manufacturers.Add(new Maule()); }
public UICollectionViewExample(UICollectionViewLayout layout) : base(layout) { _items = new List<CollectionItem> { new CollectionItem { Name = "Example 1" }, new CollectionItem { Name = "Example 2" } }; CollectionView.Delegate = new ExampleLayoutDelegate(); }
public PhotosViewController(UICollectionViewLayout layout) : base(layout) { Title = "All Photos"; imageMgr = new PHImageManager (); fetchResults = PHAsset.FetchAssets (PHAssetMediaType.Image, null); observer = new PhotoLibraryObserver (this); PHPhotoLibrary.SharedPhotoLibrary.RegisterChangeObserver (observer); }
public BingImageGridViewController (UICollectionViewLayout layout) : base (layout) { imageUrls = new List<string> (); bing = new Bing ((results) => { InvokeOnMainThread (delegate { imageUrls = results; CollectionView.ReloadData (); }); }); bing.ImageSearch (); CollectionView.ContentInset = new UIEdgeInsets (10, 10, 10, 10); }
public PodcastsController(UICollectionViewLayout layout) : base(layout) { searchBar = new UISearchBar { Placeholder = "Search for a podcast", AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None, AutoresizingMask = UIViewAutoresizing.All, Alpha = 0.4f }; searchBar.SizeToFit(); searchBar.SearchButtonClicked += (sender, e) => { Search(searchBar.Text); searchBar.ResignFirstResponder(); }; searchBar.TextChanged += (sender, e) => Search(e.SearchText); }
public ProductCollectionViewController(UICollectionViewLayout layout) : base (layout){ InitialViewSetup (); }
public override CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { return new CGSize (361, 256); }
protected MvxEventSourceCollectionViewController(UICollectionViewLayout layout) : base(layout) { }
public SubMenuCollectionViewController(UICollectionViewLayout layout, List<SubMenuItem> items) : base(layout) { this.menuItems = items; }
public ViewController (UICollectionViewLayout layout) : base (layout) { }
public CGSize GetSizeForItem (UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath) { return cellSize; }
public CollectionViewController(UICollectionViewLayout layout) : base(layout) { CollectionView.ContentSize = UIScreen.MainScreen.Bounds.Size; }
public APLCollectionViewController (UICollectionViewLayout layout) : base (layout) { CollectionView.RegisterClassForCell (typeof (APLCollectionViewCell), APLCollectionViewCell.Key); }
public override UICollectionViewTransitionLayout TransitionLayout (UICollectionView collectionView, UICollectionViewLayout fromLayout, UICollectionViewLayout toLayout) { return new APLTransitionLayout (fromLayout, toLayout); }
public PictureBigCollectionController(UICollectionViewLayout layout) { }
public PhotosCollectionViewController(UICollectionViewLayout layout) : base(layout) { imageUrls = new List<string> (); bing = new Bing ((results) => { InvokeOnMainThread (delegate { imageUrls = results[0]; largeImageUrls = results[1]; CollectionView.ReloadData (); }); }); bing.ImageSearch (); }
protected MvxCollectionViewController(UICollectionViewLayout layout) : base(layout) { this.AdaptForBinding(); }