public override bool OnTouchEvent(MotionEvent e) { if (Carousel.Loop) { _carouselViewLoopManager.CenterIfNeeded(this, IsHorizontal); } return(base.OnTouchEvent(e)); }
public override void ViewDidLayoutSubviews() { base.ViewDidLayoutSubviews(); if (Carousel?.Loop == true && _carouselViewLoopManager != null) { _updatingScrollOffset = true; _carouselViewLoopManager.CenterIfNeeded(CollectionView, IsHorizontal); _updatingScrollOffset = false; } if (CollectionView.Bounds.Size != _size) { _size = CollectionView.Bounds.Size; BoundsSizeChanged(); } else { UpdateInitialPosition(); } }