Beispiel #1
0
        private void NavigateToFragment(object sender, EventArgs e)
        {
            Activity.Title = "SecondFragment";
            var transaction = Activity.SupportFragmentManager.BeginTransaction();
            var fragment2   = new Fragment2();

            transaction.Replace(Resource.Id.rootLayout, new Fragment2());
            transaction.AddToBackStack(null);
            transaction.Commit();
        }
Beispiel #2
0
        public static Fragment2 NewInstance()
        {
            var frag2 = new Fragment2 {
                Arguments = new Bundle()
            };

            return(frag2);
            //var bundle = new Bundle();
            //return new Fragment1 { Arguments = bundle };
        }