private void changeFrame(string _type) { FragmentTransaction ft = FragmentManager.BeginTransaction(); Fragment fragment = null; if (_type.Equals("aboutus")) { fragment = new FragmentAboutUs(); } else if (_type.Equals("products")) { fragment = new FragmentProducts(); } else if (_type.Equals("Citas")) { fragment = new FragmentCitas(); } else { } if (fragment != null) { ft.Replace(Resource.Id.fragmentMany, fragment); //ft.AddToBackStack(null); ft.SetTransition(FragmentTransit.FragmentFade); ft.Commit(); } }
public void changeFrame(string _type, Dictionary <string, string> _params) { FragmentTransaction ft = FragmentManager.BeginTransaction(); Bundle bundleParams = new Bundle(); Fragment fragment = null; if (_type.Equals("aboutus")) { fragment = new FragmentAboutUs(); } else if (_type.Equals("products")) { fragment = new FragmentProducts(this); } else if (_type.Equals("detail_products")) { foreach (string o in _params.Keys) { bundleParams.PutString(o, _params[o]); } fragment = new FragmentDetailProducts(this); } else { } if (fragment != null) { fragment.Arguments = bundleParams; ft.Replace(Resource.Id.fragmentMany, fragment); //ft.AddToBackStack(null); ft.SetTransition(FragmentTransit.FragmentFade); ft.Commit(); } }