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); }
public static NotificationsFragment NewInstance() { var frag1 = new NotificationsFragment { Arguments = new Bundle() }; return(frag1); }