public static StationsFragment NewInstance(IStationsView view, IStationsPresenter presenter) { var fragment = new StationsFragment { _view = view, _presenter = presenter }; return(fragment); }
private void SetupTabs() { var tabs = new List <StationsTab> { new StationsTab(StationsFragment.NewInstance(this, _presenter), "Todas"), new StationsTab(StationsFragment.NewInstance(this, _lowLightStationsPresenter), "Poca disponibilidad"), new StationsTab(StationsFragment.NewInstance(this, _topAvailableStationsPresenter), "Top 5") }; var mainPageAdapter = new StationsTabAdapter(SupportFragmentManager, tabs); _viewPager = FindViewById <ViewPager>(Resource.Id.viewPager); _viewPager.OffscreenPageLimit = 3; _viewPager.Adapter = mainPageAdapter; _viewPager.SetPageTransformer(true, new ScaleTransformer()); }