/// <summary> /// Our Custom Carousel Page starts here. /// First we have to get the working adapter. /// Then remove the parent's view, and finally reapplied our own view. /// </summary> protected override void OnAttachedToWindow() { base.OnAttachedToWindow(); adapter = new TabCarouselPageAdapter(viewPager, Element, Context); viewPager.SetOnPageChangeListener(adapter); indicator.SetOnPageChangeListener(adapter); viewPager.Adapter = adapter; UpdateCurrentItem(); indicator.SetViewPager(viewPager); }
/// <summary> /// Our Custom Carousel Page starts here. /// First we have to get the working adapter. /// Then remove the parent's view, and finally reapplied our own view. /// </summary> protected override void OnAttachedToWindow () { base.OnAttachedToWindow (); adapter = new TabCarouselPageAdapter ( viewPager , Element , Context ); viewPager.SetOnPageChangeListener ( adapter ); indicator.SetOnPageChangeListener ( adapter ); viewPager.Adapter = adapter; UpdateCurrentItem (); indicator.SetViewPager ( viewPager ); }