示例#1
0
 public override Fragment GetItem(int position)
 {
     return(position switch
     {
         0 => SummaryFragment.NewInstance(movieName, movieId),
         1 => CastFragment.NewInstance(movieId),
         2 => VideosFragment.NewInstance(movieName, movieId, releaseDate, lang),
         //3 => TrailerFragment.NewInstance(movieName, movieId, backdrop),
         3 => ReviewFragment.NewInstance(movieName, movieId),
         4 => SimilarMoviesFragment.NewInstance(movieId),
         _ => null,
     });
示例#2
0
        public static VideosFragment NewInstance(string movieName, int movieId, string relaseDate, string lang)
        {
            var    frag1  = new VideosFragment();
            Bundle bundle = new Bundle();

            bundle.PutInt("movieId", movieId);
            bundle.PutString("movieName", movieName);
            bundle.PutString("relaseDate", relaseDate);
            bundle.PutString("lang", lang);
            frag1.Arguments = bundle;
            return(frag1);
        }