public void OnCiudadSeleccionada(string informacion, int logo) { FrameLayout contenedor = FindViewById <FrameLayout>(Resource.Id.contenedorFragment); if (contenedor != null) { Bundle args = new Bundle(); args.PutString("informacion", informacion); args.PutInt("logo", logo); InformacionFragment infoCiudad = new InformacionFragment(); infoCiudad.Arguments = args; SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contenedorFragment, infoCiudad).SetTransition(Android.Support.V4.App.FragmentTransaction.TransitFragmentOpen).AddToBackStack(null).Commit(); } else { var informacionFragment = SupportFragmentManager.FindFragmentById(Resource.Id.informacion) as InformacionFragment; informacionFragment.updateInformacion(informacion, logo); } }
public void OnCiudadSeleccionada(string[] ciudades) { FrameLayout contenedor = FindViewById <FrameLayout>(Resource.Id.contenedorFragment); InformacionFragment informacion = new InformacionFragment(); if (contenedor != null) { Bundle args = new Bundle(); args.PutStringArray("ciudades", ciudades); informacion = new InformacionFragment(); informacion.Arguments = args; //SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contenedorFragment, informacion).SetTransition(Android.Support.V4.App.FragmentTransaction.TransitFragmentOpen).AddToBackStack(null).Commit(); //SupportFragmentManager.BeginTransaction().SetTransition(Android.Support.V4.App.FragmentTransaction.TransitUnset).Replace(Resource.Id.contenedorFragment, contentDetallesCiudad).AddToBackStack(null).Commit(); SupportFragmentManager.BeginTransaction().SetCustomAnimations( Resource.Animator.voltear_a_la_derecha_in, Resource.Animator.voltear_a_la_derecha_out, Resource.Animator.voltear_a_la_izquierda_in, Resource.Animator.voltear_a_la_izquierda_out ).Replace(Resource.Id.contenedorFragment, informacion).AddToBackStack(null).Commit(); } else { var informacionFragment = SupportFragmentManager.FindFragmentById(Resource.Id.Informacion) as InformacionFragment; informacionFragment.View.SetBackgroundResource(Resource.Drawable.propiedades); if (ciudades[0] == "Aguascalientes") { informacionFragment.View.SetBackgroundResource(Resource.Drawable.Aguascalientes); } if (ciudades[0] == "Calvillo") { informacionFragment.View.SetBackgroundResource(Resource.Drawable.Calvillo); } //android:background="#ddffffff" //LinearLayout l = (LinearLayout)FindViewById(Resource.Id.Informacion); //l.SetBackgroundResource(Resource.Drawable.propiedades); informacionFragment.updateInformacion(ciudades); } }