internal void TearDown() { Carousel.Scrolled -= CarouselViewScrolled; UnsubscribeCollectionItemsSourceChanged(ItemsSource); _carouselViewLoopManager?.Dispose(); _carouselViewLoopManager = null; }
protected override void Dispose(bool disposing) { if (disposing && !_disposed) { _disposed = true; _carouselViewLoopManager?.SetItemsSource(null); _carouselViewLoopManager = null; if (_itemDecoration != null) { _itemDecoration.Dispose(); _itemDecoration = null; } ClearLayoutListener(); } base.Dispose(disposing); }
public CarouselViewOnScrollListener(ItemsView itemsView, ItemsViewAdapter <CarouselView, IItemsViewSource> itemsViewAdapter, CarouselViewLoopManager carouselViewLoopManager) : base((CarouselView)itemsView, itemsViewAdapter, true) { _carouselView = itemsView as CarouselView; _carouselViewLoopManager = carouselViewLoopManager; }
public MauiCarouselRecyclerView(Context context, Func <IItemsLayout> getItemsLayout, Func <ItemsViewAdapter <CarouselView, IItemsViewSource> > getAdapter) : base(context, getItemsLayout, getAdapter) { _oldViews = new List <View>(); _carouselViewLoopManager = new CarouselViewLoopManager(); }
public override void ViewDidLoad() { _carouselViewLoopManager = new CarouselViewLoopManager(Layout as UICollectionViewFlowLayout); base.ViewDidLoad(); }