Exemplo n.º 1
0
        void LoadFragment(int id)
        {
            Fragment fragment = null;

            switch (id)
            {
            case Resource.Id.menu_home:
                Fragment s = new HairListFragment();
                fragment = s;
                break;

            case Resource.Id.menu_audio:
                fragment = BookingStatusListFragment.NewInstance();
                break;

            case Resource.Id.menu_video:
                fragment = Fragment4.NewInstance();
                break;
            }
            if (fragment == null)
            {
                return;
            }

            FragmentManager.BeginTransaction().Replace(Resource.Id.content_frame2, fragment).Commit();
            //   Activity.SupportFragmentManager.BeginTransaction().Remove(fragment);


            //Activity.SupportFragmentManager.BeginTransaction()
            //  .Add(Resource.Id.content_frame, fragment)
            //  .Commit();
        }
Exemplo n.º 2
0
        public static Fragment4 NewInstance()
        {
            var frag2 = new Fragment4 {
                Arguments = new Bundle()
            };

            return(frag2);
        }