I have a map fragment inside another fragment. This worked before, but I think it went wrong after I updated the Google Play services library. What's wrong? fragment_map.xml:
<fragment android:name="com.google.android.gms.maps.SupportMapFragment" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" />
MapFragment:
GoogleMap map; private static View view; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (view != null) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) parent.removeView(view); } try { view = inflater.inflate(R.layout.fragment_map, container, false); map = ((SupportMapFragment) getActivity() .getSupportFragmentManager() .findFragmentById(R.id.map)) .getMap();
source share