void setFragments() { mFragment1 = new Fragment1(); mStackFragments = new Stack <SupportFragment>(); var trans = SupportFragmentManager.BeginTransaction(); trans.Add(Resource.Id.fragmentContainer, mFragment1, "Fragment1"); trans.Commit(); mCurrentFragment = mFragment1; }
void setFragments() { mFragment1 = new Fragment1(); mFragment2 = new Fragment2(); mFragment3 = new Fragment3(); mStackFragments = new Stack <SupportFragment>(); var trans = SupportFragmentManager.BeginTransaction(); trans.Add(Resource.Id.fragmentContainer, mFragment3, "Fragment3"); trans.Hide(mFragment3); trans.Add(Resource.Id.fragmentContainer, mFragment2, "Fragment2"); trans.Hide(mFragment2); trans.Add(Resource.Id.fragmentContainer, mFragment1, "Fragment1"); trans.Commit(); //SupportActionBar.Title =" - " + Resources.GetString(Resource.String.Frag1Title); mCurrentFragment = mFragment1; }