public static NextEpisodeFragment NewInstance(TVEpisode episode)
        {
            NextEpisodeFragment frag = new NextEpisodeFragment();

            Bundle args = new Bundle();
            string serializeObject = JsonConvert.SerializeObject(episode);
            args.PutString("myEpisode", serializeObject);

            frag.Arguments = args;

            return frag;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            // return inflater.Inflate(Resource.Layout.YourFragment, container, false);

            View v;
            if (((ShowOverviewActivity) Activity).GetIsAfterAnimation())
            {
                v = inflater.Inflate(Resource.Layout.shows_overview_fragment_after, container, false);
            }
            else
            {
                v = inflater.Inflate(Resource.Layout.shows_overview_fragment_before, container, false);
            }

            if (v.FindViewById<LinearLayout>(Resource.Id.llSmallPortrait) != null)
            {
                linearLayout = v.FindViewById<LinearLayout>(Resource.Id.llSmallPortrait);
                ((ShowOverviewActivity) Activity).SetIsSmall(true);
                ((ShowOverviewActivity) Activity).SetIsPortrait(true);
                _showTabHolderFrameLayout = v.FindViewById<FrameLayout>(Resource.Id.frameForSeasonList);


                if (((ShowOverviewActivity) Activity).GetIsAfterAnimation())
                {
                    _detailsShowEpisodeTabsFragment =
                (DetailsShowEpisodeTabsFragment)ChildFragmentManager.FindFragmentByTag("DetailsShowEpisodeTabsFragment");
                    if (_detailsShowEpisodeTabsFragment != null)
                    {

                        var mySeason = _detailsShowEpisodeTabsFragment.GetSeasonNumber();
                        //var position = _detailsShowEpisodeTabsFragment.GetPosition();
                        var fm = ChildFragmentManager.BeginTransaction();
                        fm.Remove(_detailsShowEpisodeTabsFragment);
                        fm.Commit();
                        _detailsShowEpisodeTabsFragment =
                            DetailsShowEpisodeTabsFragment.NewInstance(_myShow.GetTVSeasonByNumber(mySeason), _positionInEpisodeTabList);
                        var ft = ChildFragmentManager.BeginTransaction();
                        ft.Replace(Resource.Id.frameTabHolder, _detailsShowEpisodeTabsFragment,
                            "DetailsShowEpisodeTabsFragment");
                        ft.Commit();
                    }
                }
                    else
                {
                    SetUpShowTabHolderFragment();
                }
            }
            else if (v.FindViewById<LinearLayout>(Resource.Id.llSmallLandscape) != null)
            {
                _seasonListFrameLayout = v.FindViewById<FrameLayout>(Resource.Id.frameForSeasonList);
                _showDescriptionFrameLayout = v.FindViewById<FrameLayout>(Resource.Id.frameForShowDescription);
                _nextUnwatchedEpisodeFrameLayout = v.FindViewById<FrameLayout>(Resource.Id.frameForNextEpisodeInfo);

                SetUpSeasonListFragment();

                linearLayout = v.FindViewById<LinearLayout>(Resource.Id.llSmallLandscape);
                ((ShowOverviewActivity)Activity).SetIsSmall(true);
                ((ShowOverviewActivity)Activity).SetIsPortrait(false);

                if (((ShowOverviewActivity)Activity).GetIsAfterAnimation())
                {
                    _nextUnwatchedEpisodeFragment =
                        NextEpisodeFragment.NewInstance(_myShow.GetNextUnwatchedEpisode());

                    _detailsShowEpisodeTabsFragment =
                (DetailsShowEpisodeTabsFragment)ChildFragmentManager.FindFragmentByTag("DetailsShowEpisodeTabsFragment");

                    if (_detailsShowEpisodeTabsFragment != null)
                    {

                        var mySeason = _detailsShowEpisodeTabsFragment.GetSeasonNumber();

                        var fm = ChildFragmentManager.BeginTransaction();
                        fm.Remove(_detailsShowEpisodeTabsFragment);
                        fm.Commit();
                        _detailsShowEpisodeTabsFragment = DetailsShowEpisodeTabsFragment.NewInstance(_myShow.GetTVSeasonByNumber(mySeason), _positionInEpisodeTabList);
                        var ft = ChildFragmentManager.BeginTransaction();
                        ft.Add(Resource.Id.frameForNextEpisodeInfo, _detailsShowEpisodeTabsFragment,
                           "DetailsShowEpisodeTabsFragment");
                        ft.Commit();

                    }

                    //SetUpEpisodeTabViewFragment();
                }
                else
                {
                    SetUpShowDescriptionFragment();
                    SetUpNextUnwatchedEpisodeFragment();
                }
            }
            else
            {
                _seasonListFrameLayout = v.FindViewById<FrameLayout>(Resource.Id.frameForSeasonList);
                _showDescriptionFrameLayout = v.FindViewById<FrameLayout>(Resource.Id.frameForShowDescription);
                _nextUnwatchedEpisodeFrameLayout = v.FindViewById<FrameLayout>(Resource.Id.frameForNextEpisodeInfo);
                
                SetUpSeasonListFragment();

                if (v.FindViewById<LinearLayout>(Resource.Id.llLargePortrait) != null)
                {
                    linearLayout = v.FindViewById<LinearLayout>(Resource.Id.llLargePortrait);
                    ((ShowOverviewActivity) Activity).SetIsSmall(false);
                    ((ShowOverviewActivity) Activity).SetIsPortrait(true);
                    leftSide = v.FindViewById<LinearLayout>(Resource.Id.leftSide);

                    if (((ShowOverviewActivity) Activity).GetIsAfterAnimation())
                    {
                        _nextUnwatchedEpisodeFragment =
                            NextEpisodeFragment.NewInstance(_myShow.GetNextUnwatchedEpisode());
                        SetUpEpisodeTabViewFragment();
                    }
                    else
                    {
                        SetUpShowDescriptionFragment();
                        SetUpNextUnwatchedEpisodeFragment();
                    }
                }
                else if (v.FindViewById<LinearLayout>(Resource.Id.llLargeLandscape) != null)
                {
                    if (((ShowOverviewActivity) Activity).GetIsAfterAnimation())
                    {
                        linearLayout = v.FindViewById<LinearLayout>(Resource.Id.llLargeLandscape);
                        ((ShowOverviewActivity) Activity).SetIsSmall(false);
                        ((ShowOverviewActivity) Activity).SetIsPortrait(false);
                        _nextUnwatchedEpisodeFragment =
                            NextEpisodeFragment.NewInstance(_myShow.GetNextUnwatchedEpisode());
                        SetUpEpisodeTabViewFragment();
                    }
                    else
                    {
                        linearLayout = v.FindViewById<LinearLayout>(Resource.Id.llLargeLandscape);
                        ((ShowOverviewActivity) Activity).SetIsSmall(false);
                        ((ShowOverviewActivity) Activity).SetIsPortrait(false);
                        SetUpShowDescriptionFragment();
                        SetUpNextUnwatchedEpisodeFragment();
                    }

                }
            }
            _stateMemory = ((ShowOverviewActivity) Activity).GetStateMemory();

            //if (savedInstanceState != null)
            //{
            //    SetUpNextUnwatchedEpisodeFragment();
            //    _nextUnwatchedEpisodeFragment.UpdateEpisode(_myShow.GetNextUnwatchedEpisode());
            //    SetUpSeasonListFragment();
            //    _seasonListFragment.UpdateShow(_myShow);
            //}
            return v;
        }
        private void SetUpNextUnwatchedEpisodeFragment()
        {
            _nextUnwatchedEpisodeFragment =
                (NextEpisodeFragment) ChildFragmentManager.FindFragmentByTag("NextEpisodeFragment");

            if (_nextUnwatchedEpisodeFragment == null)
            {
                _nextUnwatchedEpisodeFragment = NextEpisodeFragment.NewInstance(_myShow.GetNextUnwatchedEpisode());

                var fm = ChildFragmentManager.BeginTransaction();
                fm.Add(Resource.Id.frameForNextEpisodeInfo, _nextUnwatchedEpisodeFragment,
                    "NextEpisodeFragment");
                fm.Commit();
            }
        }