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

            bundle.PutInt("movieId", movieId);
            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,
     });