Exemple #1
0
        protected override void OnAttachedToWindow()
        {
            base.OnAttachedToWindow();
            var adapter = new CarouselPageAdapter(_viewPager, Element, Context);

            _viewPager.Adapter = adapter;
            _viewPager.AddOnPageChangeListener(adapter);

            adapter.UpdateCurrentItem();

            Element.SendAppearing();
        }
Exemple #2
0
        protected override void OnAttachedToWindow()
        {
            base.OnAttachedToWindow();
            var adapter = new CarouselPageAdapter(_viewPager, Element, Context);

            _viewPager.Adapter = adapter;
            _viewPager.AddOnPageChangeListener(adapter);

            adapter.UpdateCurrentItem();

            if (Parent is PageContainer pageContainer && (pageContainer.IsInFragment || pageContainer.Visibility == ViewStates.Gone))
            {
                return;
            }
            PageController.SendAppearing();
            Element.CurrentPage?.SendAppearing();
        }