Пример #1
0
        public static SummaryFragment NewInstance(string name, int movieId)
        {
            var    frag1  = new SummaryFragment();
            Bundle bundle = new Bundle();

            bundle.PutInt("movieId", movieId);
            bundle.PutString("name", name);
            frag1.Arguments = bundle;
            return(frag1);
        }
Пример #2
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,
     });