void LoadFragment(int id)
        {
            Android.Support.V4.App.Fragment fragment = null;
            switch (id)
            {
            case Resource.Id.menu_home:
                fragment = Fragment1.NewInstance();
                break;

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

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

            SupportFragmentManager.BeginTransaction()
            .Replace(Resource.Id.content_frame, fragment)
            .Commit();
        }
Exemple #2
0
        public static Fragment3 NewInstance()
        {
            var frag3 = new Fragment3 {
                Arguments = new Bundle()
            };

            return(frag3);
        }