public override Android.Support.V4.App.Fragment GetItem(int position) { switch (position) { case 0: return(MoviesFragment.NewInstance(MovieListType.NowPlaying)); case 1: return(MoviesFragment.NewInstance(MovieListType.Upcoming)); //case 2: // return MoviesFragment.NewInstance(MovieListType.Trending); case 2: return(MoviesFragment.NewInstance(MovieListType.Popular)); case 3: return(TmdbTopRatedMoviesFragment.NewInstance()); case 4: return(ImdbMoviesFragment.NewInstance()); default: return(null); } }
public static MoviesFragment NewInstance(MovieListType type) { var frag1 = new MoviesFragment(); Bundle bundle = new Bundle(); bundle.PutInt("movieListType", (int)type); frag1.Arguments = bundle; return(frag1); }