Пример #1
0
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            fragSelectTerm   = new FragmentSelectTerm();
            fragSelectSuject = new FragmentSelectSubjects();
            FragmentSelectTerm.ClickSelectTerm += FragSelectTerm_ClickSelectTerm;

            // Create your fragment here
        }
Пример #2
0
        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 view  = inflater.Inflate(Resource.Layout.fragment_first_quiz, container, false);
            var  trans = FragmentManager.BeginTransaction();

            if (FragmentManager.FindFragmentByTag("Select term") != null)
            {
                fragSelectTerm = new FragmentSelectTerm();
                trans.Replace(Resource.Id.fragment_test, fragSelectTerm);
                trans.AddToBackStack(null);
                trans.Commit();
                return(view);
            }
            trans.Add(Resource.Id.fragment_test, fragSelectTerm, "Select term");
            trans.Commit();
            return(view);
        }