Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        private 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 FragmentProductos();
            }
            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.fragmentManyo, fragment);
                //ft.AddToBackStack(null);
                ft.SetTransition(FragmentTransit.FragmentFade);
                ft.Commit();
            }
        }