예제 #1
0
        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);
            }
        }
예제 #2
0
        public static MoviesFragment NewInstance()
        {
            var    frag1  = new TmdbTopRatedMoviesFragment();
            Bundle bundle = new Bundle();

            bundle.PutInt("movieListType", (int)MovieListType.TopRated);
            frag1.Arguments = bundle;
            return(frag1);
        }