public static SinglePortrait NewInstance(List <Slide> slides) { SinglePortrait singlePortrait = new SinglePortrait(); singlePortrait.fragments = SlideFragment.GetFragments(slides); singlePortrait.currentPosition = 0; return(singlePortrait); }
void SetupViewPager() { var slideFragments = SlideFragment.GetFragments(slides); var pagerAdapter = new Adapters.PagerAdapter(ChildFragmentManager, slideFragments); viewPager.Adapter = pagerAdapter; viewPager.SetCurrentItem(currentPosition, false); viewPager.AddOnPageChangeListener(this); }