I'm trying to load a map fragment and I have a problem with the imports:
If in the map fragment I import android.support.v4.app.Fragment, in the fragment from which I launched it, I get an error in the .replace because an argument of type android.app.Fragment is required.
Maps_fragment mapsf = new Maps_fragment();
Bundle bundle = new Bundle();
bundle.putString("latitud", instalacion.Latitud);
bundle.putString("longitud", instalacion.Longitud);
bundle.putString("titulo", instalacion.Nombre);
bundle.putBoolean("editable", false);
mapsf.setArguments(bundle);
getFragmentManager().beginTransaction().replace(R.id.flContenedor, mapsf).addToBackStack(null).commit();
However, if in the map fragment I import android.app.Fragment, it allows me to do the replace but I find the error "Inconvertible types; can not cast 'android.app.Fragment' to 'com.google.android. gms.maps.SupportMapFragment '"in the following line:
SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
Is there any way to load the fragment by being android.support.v4.app.Fragment or some other solution? Thanks!