public override bool OnTouchEvent(MotionEvent e)
        {
            if (Carousel.Loop)
            {
                _carouselViewLoopManager.CenterIfNeeded(this, IsHorizontal);
            }

            return(base.OnTouchEvent(e));
        }
Beispiel #2
0
        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();
            }
        }