示例#1
0
 internal void TearDown()
 {
     Carousel.Scrolled -= CarouselViewScrolled;
     UnsubscribeCollectionItemsSourceChanged(ItemsSource);
     _carouselViewLoopManager?.Dispose();
     _carouselViewLoopManager = null;
 }
示例#2
0
        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);
        }
示例#3
0
 public CarouselViewOnScrollListener(ItemsView itemsView, ItemsViewAdapter <CarouselView, IItemsViewSource> itemsViewAdapter, CarouselViewLoopManager carouselViewLoopManager) : base((CarouselView)itemsView, itemsViewAdapter, true)
 {
     _carouselView            = itemsView as CarouselView;
     _carouselViewLoopManager = carouselViewLoopManager;
 }
示例#4
0
 public MauiCarouselRecyclerView(Context context, Func <IItemsLayout> getItemsLayout, Func <ItemsViewAdapter <CarouselView, IItemsViewSource> > getAdapter) : base(context, getItemsLayout, getAdapter)
 {
     _oldViews = new List <View>();
     _carouselViewLoopManager = new CarouselViewLoopManager();
 }
示例#5
0
 public override void ViewDidLoad()
 {
     _carouselViewLoopManager = new CarouselViewLoopManager(Layout as UICollectionViewFlowLayout);
     base.ViewDidLoad();
 }