コード例 #1
0
        public static SimilarMoviesFragment NewInstance(int movieId)
        {
            var    frag1  = new SimilarMoviesFragment();
            Bundle bundle = new Bundle();

            bundle.PutInt("movieId", movieId);
            frag1.Arguments = bundle;
            return(frag1);
        }
コード例 #2
0
ファイル: PagerAdapter.cs プロジェクト: dpjha84/MovieBuddy
 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,
     });