Esempio n. 1
0
        private bool loadFragment(int id)
        {
            Fragment fragment = null;

            switch (id)
            {
            case Resource.Id.navigation_devices:
                fragment = DeviceFragment.NewInstance();
                break;

            case Resource.Id.navigation_single_color:
                fragment = SingleColorFragment.NewInstance();
                break;

            case Resource.Id.navigation_glow:
                fragment = GlowColorFragment.NewInstance();
                break;

            case Resource.Id.navigation_notifications:
                fragment = NotificationsFragment.NewInstance();
                break;

            default:
                return(false);
            }

            FragmentTransaction fragmentTx = this.FragmentManager.BeginTransaction();

            fragmentTx.Replace(Resource.Id.content_frame, fragment);
            fragmentTx.Commit();


            return(true);
        }
Esempio n. 2
0
        public static SingleColorFragment NewInstance()
        {
            var frag1 = new SingleColorFragment {
                Arguments = new Bundle()
            };

            return(frag1);
        }