public static ShowsOverviewMajorFragment NewInstance(TVShow show) { var frag = new ShowsOverviewMajorFragment(); var args = new Bundle(); var serializedShow = JsonConvert.SerializeObject(show); args.PutString("myShowString", serializedShow); frag.Arguments = args; return frag; }
public void SetUpBeforeFragment() { _showsOverviewMajorFragment = (ShowsOverviewMajorFragment)SupportFragmentManager.FindFragmentByTag("ShowsOverviewMajorFragment"); if (_showsOverviewMajorFragment == null) { _showsOverviewMajorFragment = ShowsOverviewMajorFragment.NewInstance(_myShow); FragmentTransaction ft = SupportFragmentManager.BeginTransaction(); ft.Add(Resource.Id.frameForOverviewFragment, _showsOverviewMajorFragment , "ShowsOverviewMajorFragment"); ft.Commit(); } }